in reply to RFC How to retrieve a hash from a hash of hashes

Thanks for the example.

Understanding of how to build “complex” data structures in Perl centers completely around the notion of references.   Pretty much every “value” that you can assign to anything anywhere actually consists of a dynamically allocated block of storage that has a “reference count” and that can be “garbage collected.”   You can create multiple “references to” that value, and each of those references will ultimately arrive at the same block of memory, which won” be garbage-collected (or “reaped”) until its reference-count again becomes zero.   Since the reference, itself, is a scalar value (as opposed to whatever the reference refers to...) it can become part of any data structure:   a list, an array, or a hash.   Or, more than one of these at a time.

References are one of those brilliantly simple, simple, little, brilliant things that takes a bit of time to wrap your head around, but then “the little light comes on” and you say, purrrr....   Really, one of the very nicest things about Perl is that it makes memory so drop-dead easy to manage.   It has a very sophisticated memory manager, and, It Just Works.™