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.
In reply to Re: keys in reference experimental or reference is deprecated
by Corion
in thread keys in reference experimental or reference is deprecated
by demichi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |