Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: XML Bare Hash Reference.

by AnomalousMonk (Chancellor)
on Mar 19, 2013 at 20:28 UTC ( #1024384=note: print w/replies, xml ) Need Help??

in reply to XML Bare Hash Reference.

Please check out the discussion in the Hash statement problem. thread. The basic problem is still that the  %$hash_reference syntax (and I think also the  @$array_reference syntax) simply doesn't work (Update: within a hash/array slice expression as shown in the OP – thanks, choroba) from version 5.10.x (where x == 0, I think) onward.

Wherever you find if, you will have to change this syntax as has been noted elsewhere in this and the previous thread – or else get the maintainer(s) of the module(s) in question to change it, which is probably more trouble than just changing it yourself!

Replies are listed 'Best First'.
Re^2: XML Bare Hash Reference.
by choroba (Bishop) on Mar 19, 2013 at 20:36 UTC
    %$hash_ref and @$array_ref still work. It is @{%$hash_ref}{1,2} which does not work anymore, as it never should have worked. %$hash_ref is evaluated to a string like "1/8" which tells you how the hash uses its buckets. Then, @{"1/8"}{1,2} tries to interpret the string as a hash reference and fails. Without strict refs, you can create a hash called "1/8": ${"1/8"}{1} = "q"; print @{"1/8"}{1};
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024384]
and a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2018-06-20 19:59 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.