No such thing as a small change | |
PerlMonks |
Re: Re: More Sorted Business with Hashesby dha (Acolyte) |
on Dec 24, 2001 at 00:12 UTC ( [id://134093]=note: print w/replies, xml ) | Need Help?? |
Having not used the various modules mentioned in the thread, I'm not sure about relative overhead, but...
Using the method above to get an array of sorted keys, how about passing a hash slice, rather than your original hash to wherever you're trying to use the "ordered hash"? I.e.
@hash{@keysByValue}
rather than just
%hash
?
Slices are fun! :-)
In Section
Seekers of Perl Wisdom
|
|