No such thing as a small change | |
PerlMonks |
Re: Get element of array not looping.by choroba (Cardinal) |
on Jul 13, 2021 at 17:59 UTC ( [id://11134969]=note: print w/replies, xml ) | Need Help?? |
Perl can parse JSON, but only from a string, not directly from the source code. In Perl hashes, keys are separated by commas or fat commas from the values, not colons. Then, you can do:
It's a hash containing an array containing hashes, not a hash of hashes of arrays. Or, parse the JSON, but remove the trailing comma after the array, JSON doesn't support it:
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|