in reply to Retrieving the hash key-value in the order of their insertion without Tie::IxHash
Some ways:
- Use a tied hash, and do something similar to Tie::IxHash;
- Use an additional data structure, and consult this one when retrieving keys. Don't forget to update this datastructure each time you modify your hash.
- Don't use hashes with more than one key.
|
---|
In Section
Seekers of Perl Wisdom