An array is a list of scalars. Hashes are not scalars. Ergo, arrays cannot contain hashes.
There are two workarounds if you want to store a hash in an array:
References are scalars. Therefore, you can store a reference to a hash in an array.
Strings are scalars. If you can serialize the hash into a string, you can store that in an array.
There is no #3, and it is almost always a terrible idea to choose #2 over #1.
Why exactly are you trying to avoid using references?
In reply to Re: Generate Array of Hashes WITHOUT References
by tobyink
in thread Generate Array of Hashes WITHOUT References
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |