in reply to Keeping order, no duplicate and the complete keyset
Don't forget Super Search. You might want to seek out information on modules such as Tie::Hash. A node that may help: Preserving order for nested hashes using Tie::IxHash.
HTH,