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.
push @AoH, \%rec;
Update: Made the answer more complete by adding the second half.
In reply to Re: Generate Array of Hashes WITHOUT References
by ikegami
in thread Generate Array of Hashes WITHOUT References
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |