note
tilly
You could avoid repeated double-lookups with a Schwartzian
sort:
<code>
my @sorted_keys = map {$_->[0]}
sort {$a->[1] cmp $b->[1]}
map {[$_, $hash{$_}{this}]} keys %hash;
</code>
(Read it bottom to top and it will make more sense.)<P>
This is more memory intensive, but doing the double
lookup in the sort block means that it happens
<tt>O(n * log(n))</tt> times. Doing it in a
map means it only happens <tt>n</tt> times. (Where
<tt>n</tt> is the number of keys.)
32000
32000