in reply to Fast sublist generation

The fastest solution is to use DB_File to allow you to store the hash using Berkeley DB in a B_TREE. Then open it with the R_CURSOR flag set to true, use the OO interface (you can get the object back from the tied hash using tied) and you can locate your key by using the seq method with R_LAST.

Unless you need persistence, you should use an in-memory database.