in reply to Re: Dereferencing array of hashes
in thread Dereferencing array of hashes

monkini: The critical thing to remember here is that a so-called "array of hashes" (an @AoH) is actually an array of hash references, i.e., every element is already a hash reference. You may as well use those references as such in a Perl-style for-loop as shown by Laurent_R (although I would have used the arrow de-referencing notation  $hashref->{$_} instead of the  $$hashref{$_} form).

Replies are listed 'Best First'.
Re^3: Dereferencing array of hashes
by Laurent_R (Canon) on Nov 11, 2013 at 22:50 UTC

    (although I would have used the arrow de-referencing notation $hashref->{$_} instead of the $$hashref{$_} form)

    Yes, right, that's actually what I would probably do also given the time. I typed my post in a rush before leaving for something else and used the dereferencing notation I still know best, but I have been trying in the last months to use more and more the arrow dereferencing notation, which is somewhat clearer. I am now using systematically the arrow notation for code refs and am trying to do it more and more for hash or array refs.