in reply to Re^2: adding an element to AoH
in thread adding an element to AoH

If you're trying to add a new hash to the end of an array, then NetWallah's preferred solution is probably the right one

If you're always adding a new element to the array, I'd suggest a third solution, so you don't need to worry about the current size of the array:

push @{ $AoH[0]{'heading'} }, { item => 'eee' };

Update: Must stop skimming ... didn't see both code lines on NetWallah's response.