No such thing as a small change | |
PerlMonks |
Re: sorting hashesby Limbic~Region (Chancellor) |
on Apr 20, 2005 at 12:37 UTC ( [id://449567]=note: print w/replies, xml ) | Need Help?? |
olecs,
When people post hash sorting question, almost invariably, they just want to know how to sort the hash. They are not concerned with things like changing what sort routine to use or how to keep the hash in the order you want when inserting new keys and values. This is probably for good reason as hashes aren't intended to be in sorted order. On the other hand, sometimes that is exactly what you want which is why I wrote Tie::Hash::Sorted. Remember, anytime you use a tied implementation there is going to be a performance penalty. I have taken quite a few steps to optimize this module so if it is something you are interested, be sure to read the docs on how to get the most out of it. If you have any questions, please let me know. Cheers - L~R
In Section
Seekers of Perl Wisdom
|
|