Hi demichi,
The keys function has gone though several changes as to what it accepts as its argument over the years, the ability to return the indicies of an array when called like keys @array was added in Perl 5.12.
The last release of Perl in the 5.10 series was in 2009, so the first thing I'd recommend is that you look into upgrading your Perl.
If you can't do that for whatever reason, then you can replace (keys @{ $json_decoded->{$key1} }) with (0..$#{ $json_decoded->{$key1} }) - see the Range Operators and the $#array syntax in perldata (search for "$#").
Hope this helps,
-- Hauke D
In reply to Re: Type of arg 1 to keys must be hash (not array dereference) at
by haukex
in thread Type of arg 1 to keys must be hash (not array dereference) at
by demichi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |