in reply to How to create an array of hashes return form a subroutine

gepebril69:

Return a hash reference, which you can put in your array. See perldsc

sub addnaw { return { # anonymous hash reference a=>'foo', b=>'bar' } }

...roboticus

When your only tool is a hammer, all problems look like your thumb.