Thanks!What I found a bit confusing was how perl see the above hashref as a reference to another hashref instead of a reference to a hash with 2 keys...
| [reply] |
Yes, that can be confusing until you get used to it. The thing to keep in mind is that the values of a hash (or an array) can only be scalars. A scalar is always a single "thing": a number, a string, or a reference -- never a complex structure made of multiple things. So when we talk about something like, "a hash of hashes of arrays," that's really shorthand for, "a hash of references to hashes containing references to arrays."
| [reply] |