in reply to Hashing multiple items

"How would I declare a hash to store this type of data?"

No, you don't declare the internal structure of the hash, whatever how complex it is, the only thing you need to declare is that it is a hash (hash ref). The actual structure is resolved on fly, as you assigning (linking) entities to the hash or any of its sub-structures.

This is not only true to Perl. Imaging that you are creating a tree in c or Java. You don't need to declare what will be linked to the tree. It could be any entity. In c, it could be void *, in Java, it could be Object. In Perl, it is a ref to something (or a scalar).

Only you care what it is, as when you retrieve it, you have to tell the computer how to cast it, whether it's a scalar, scalar ref, array ref, hash ref...