in reply to Dynamic hash keys

The best way to think of a hash is that it is “an index.”   And, what is stored in that index is a reference to some thing, such as an object.   You can (very efficiently) have more than one reference to any thing, and so, I suggest that this is what you should do.

Create a Perl object (in any suitable fashion) that contains all of the information you need.   Then, add references to it into one or more purpose-built hashes (or lists, or what have you), according to the number of ways that you need to be able to find it.   All of these references are just that:   “references to” the one object-instance that you have created.   (They are not “copies.”)   Any of them can be used to find the object, and when you do so, the same object instance is found in all cases.

The object will continue to exist until no more references to it remain.

It will, of course, be advantageous to encapsulate this logic into a single Perl package, allowing the “implementation guts” to be neatly hidden away.   (After all, you simply want to be able to Do Things™ and It Just Works™ and, unless you are looking at that one package, Never Mind How.™)