Perhaps part of what you want could be found in Hash::MultiKey.
In reply to Re: quick question about hash element access by chromatic in thread quick question about hash element access by glwtta