Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Dereferencing array of hashes

by Not_a_Number (Prior)
on Nov 11, 2013 at 20:27 UTC ( #1062050=note: print w/replies, xml ) Need Help??

in reply to Re: Dereferencing array of hashes
in thread Dereferencing array of hashes'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

    Oh, this is smart++! Am glad you added this comment!

      Thanks. But Laurent_R beat me to it by a clear 30 seconds minutes. Upvote him instead.

      Update: Yes, obviously, minutes not secconds. Thanks Laurent_R and AnomalousMonk!

        Thanks. But Laurent_R beat me to it by a clear 30 seconds. Upvote him instead.

        I guess you mean 30 minutes, don't you? ;-)

        Thanks for the upvote recommendation anyway. :-)

        Duly noted, but have upvoted you both...

        Clearly, 30 minutes!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062050]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2018-02-21 12:03 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (279 votes). Check out past polls.