Re: multidimensional insertion order



Spin wrote:
> tie $xml_lines{$section}->{$section_number}, "Tie::IxHash";

> The second tie (in the if statement) is where I get the error "Can't
> locate object method "TIESCALAR" via package "Tie::IxHash" at
> wis_xml_to_html.pl line 56, <XML> line 2."

You're attempting to tie a reference to a hash to the Tie::IxHash
class. A reference is a scalar. Therefore, tie() is attempting to use
a non-existant TIESCALAR method.

You *want* to tie the hash that that reference references to the
Tie::IxHash class.

Try: (untested)

tie %{$xml_lines{$section}->{$section_number}}, "Tie::IxHash";

I do not have access to the Tie::IxHash class at the moment, so I can't
test the above. But it makes logical sense to me.

> Apologies to the offended,

Accepted.

Paul Lalli

.



Relevant Pages