in reply to Re: Cutting the top percentage out of a Hash
in thread Cutting the top percentage out of a Hash
ikegami,
Alternatively, you could use Tie::IxHash instead of a hash. The syntax is the same (thanks to tie), but the contents are ordered.
Alternatively, you could use Tie::IxHash instead of a hash. The syntax is the same (thanks to tie), but the contents are ordered.
It should be made clear that the order is the insertion order and not an arbitrary sort criteria. While the module does provide rudimentary sort capability, it is limited to asciibetical sorts of the keys or values.
Tie::Hash::Sorted may be a better fit.
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Cutting the top percentage out of a Hash
by Gavin (Archbishop) on Apr 13, 2006 at 19:07 UTC | |
by zshzn (Hermit) on Apr 13, 2006 at 20:59 UTC |
In Section
Seekers of Perl Wisdom