http://www.perlmonks.org?node_id=1001903


in reply to Building a data structure - %HoH, %HoA?

It might help to consider that the notion of references can really be your best-friend.   Feel Free™ to have any number of references to the same bit of data.   If you need to very-quickly locate pieces of data based on multiple, non-unique, key values, you could (for example) easily create a hashref which points to an arrayref containing references to the same bits of data ... which, in the end, only occur in-memory once.