in reply to array of hashes
Next, please use warnings; use strict;, then clean up any errors and warnings.
That being said, I tried using perltidy to clean up your code the best I could, and I still got an error:
Can't call method "0" on unblessed reference
How many children do you expect in your code? 1?
my $cnt = 0; for (keys %barry) {$cnt++ if $_ eq 'children'} print "cnt=$cnt\n"; __END__ cnt=1
|
|---|