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.
In reply to Re: How to create an array of hashes return form a subroutine
by roboticus
in thread How to create an array of hashes return form a subroutine
by gepebril69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |