Just a note: The syntax keys @{$AoH_records}[0] (that's keys on a hashref instead of a hash) has been available since v5.14 and is "highly experimental" (as documented at the bottom of keys), and as of v5.20 generates a warning "keys on reference is experimental". This is due in part to the fact that the experimental postfix dereference syntax is available as of v5.20, which may replace the "keys on reference" (autoderef) feature in the future (see perl5200delta).
So alternatively you could write keys %{$AoH_records->[0]} to avoid the whole thing. Or, assuming the postderef syntax becomes standard, you can write use feature 'postderef'; and then keys $AoH_records->[0]->%*
In reply to Re: get keys from array of hashes
by Anonymous Monk
in thread get keys from array of hashes
by PerlSufi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |