in reply to Re: Dereferencing array of hashes
in thread Dereferencing array of hashes
...it's not necessary to use a C-style loop here
Indeed. In fact I'd simplify things even further by not using an array index at all:
for my $item ( @AoH ) { for my $key ( keys %$item ) { print "$key => $item->{ $key }\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dereferencing array of hashes
by Kenosis (Priest) on Nov 11, 2013 at 20:41 UTC | |
by Not_a_Number (Prior) on Nov 11, 2013 at 21:05 UTC | |
by Laurent_R (Canon) on Nov 11, 2013 at 22:33 UTC | |
by AnomalousMonk (Archbishop) on Nov 12, 2013 at 03:47 UTC | |
by Kenosis (Priest) on Nov 11, 2013 at 21:46 UTC |