in reply to keys in reference experimental or reference is deprecated
Maybe you can show us what is in $json_decoded and $key1 and $json_decoded->{$key1}?
The syntax that will work on all versions of Perl is keys %{ $json_decoded->{$key1} }, provided that $json_decoded is a hash reference.
I note that your usage of $key2 is inconsistent with its name - you're using it as array index, not as a hash key:
for my $key3 (keys $json_decoded->{$key1}[$key2])
This is a change allowed since Perl 5.12, but I find it somewhat confusing still.
I guess the best approach is to reduce your data structure and code to a short, self-contained example that still exhibits the problem and then to post that together with the Perl versions and their output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: keys in reference experimental or reference is deprecated
by demichi (Beadle) on Nov 17, 2016 at 16:25 UTC | |
by Corion (Patriarch) on Nov 17, 2016 at 16:32 UTC | |
by demichi (Beadle) on Nov 17, 2016 at 16:44 UTC | |
by davido (Cardinal) on Nov 17, 2016 at 16:35 UTC | |
by demichi (Beadle) on Nov 17, 2016 at 16:45 UTC |