There are several very useful modules at CPAN to work with Perl hashes. Here is a short list to get you started.
- Tie::Hash::Approx – use key approximation to find values.
- Tie::AliasHash – use multiple keys for a single value.
- Tie::Hash::Expire – expire keys in hash after a predefined period of time.
- Bloom::Filter, Bloom16, Text::Bloom – implementation of Bloom’s filter algorithm.
- Tie::Hash::Regex, Tie::RegexpHash – use regular expressions to match hash keys.
- Tie::SortHash, Tie::Hash::Rank, Tie::InsertOrderHash, Tie::Hash::Indexed, Tie::IxHash – sorting hashes by key, by value; keeping hashes sorted, keeping elements in the same order they were inserted, etc.
- Tie::RangeHash – associating values with a range of keys (e.g.: from 1 to 6 is “a”, from 7 to 10 is “b”, etc)
I’ve used this article (in Russian) as a base for this post.