P is for Practical | |
PerlMonks |
Re: Generate Array of Hashes WITHOUT Referencesby ikegami (Patriarch) |
on Sep 09, 2014 at 05:04 UTC ( [id://1099936]=note: print w/replies, xml ) | Need Help?? |
Elements of arrays are scalars. You cannot store a hash in $a[0] any more than you could in $x. That said, you could delay creating the reference until the last moment, if that's what you're looking for.
Update: Made the answer more complete by adding the second half.
In Section
Seekers of Perl Wisdom
|
|