in reply to sort performance
You don't need the foreach loop, otherwise your method is fine (that's how I always do it.)my @sortedkeys = sort { $hash{$a}->{this} cmp $hash{$b}->{this} } keys + %hash
Update: Oh, my mistake... I see that @sortedkeys is the array for the foreach loop. So you are doing fine, although for fun we should try to come up with a bunch of methods and then benchmark them.
|
---|
In Section
Seekers of Perl Wisdom