http://www.perlmonks.org?node_id=1024384


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 (Cardinal) 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};
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ