in reply to Extract keys from an Array of Hashes

This isn't exactly what you want, but it (Data::Rmap) is new to my toolbox and quite handy if your structure becomes more mangled:
use strict; use warnings; use Data::Rmap qw(:all); my @AoH = ( {'name' => 'Barney', 'age' => '34'}, {'name' => 'Fred', 'age' => '36'}, {'name' => { first => 'John', last => 'Doe' }, age => '40' } ); rmap_hash { print join "\n" => keys %$_; print "\n"; } @AoH;
name age name age name age first last