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

  • Re: how do i tie a reference to a hash
    ... > I'm trying to tie a hash that is returned from a DBI ... One is to pass the reference as a parameter to TIEHASH, ...
    (comp.lang.perl)
  • Re: multidimensional insertion order
    ... > I'm parsing a quasi-xml file into a hash, and here is the code that is ... Since you don't want to tie a reference, you have to tie a hash ...
    (comp.lang.perl.misc)
  • Re: Newbie Question: How many fly sizes & colors to tie for next season?
    ... Ted Leeson's and Jim Schollmeyer's book "The Fly Tier's Benchside ... It's a wonderful reference manual with step by step ... I really feel at peace when I tie flies. ...
    (rec.outdoors.fishing.fly)
  • Re: 300 mA from a microcontroller pin
    ... use a single op-amp follower to produce a regulated ... 2.5v reference, and tie the first stage sources to that. ...
    (comp.arch.embedded)
  • Re: Same problem
    ... You might want to tie this message to the original with ... either a reference or by replying to that original. ... Herb Martin ...
    (microsoft.public.win2000.dns)