laziness, impatience, and hubris | |
PerlMonks |
keys in reference experimental or reference is deprecatedby demichi (Beadle) |
on Nov 17, 2016 at 16:08 UTC ( [id://1176056]=perlquestion: print w/replies, xml ) | Need Help?? |
demichi has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I had a nice code working but after testing on a differnt Perl Version I get some errors.
That worked fine on server 1. On server 2 I got message "keys on reference is experimental" 3 times (on every line with "keys ...") and I learned to use ... keys %{ $json_decoded } instead of ... keys $json_decoded This works on both systems. But when I change to ... keys %{ $json_decoded->{$key1} } instead of ... keys $json_decoded->{$key1} ... I get the message "Script died: Not a HASH reference at". Can you help me with the right syntax please to get it run on every Perl version? Thanks & regards de Michi
Back to
Seekers of Perl Wisdom
|
|