in reply to Extract keys from an Array of Hashes

See, how data structure in Perl works. It will be helpful a lot.
What you have is.
my %hash = $AoH[0]; print keys %hash;
You can just combine these too.
print keys %hash = print keys %{ hash } = print keys %{ $AoH[0] }