in reply to How to sort a hash by its values?

Sure, you just want to sort the keys based on their values:
my %hash = ( ... ); my @sorted_keys = sort { $hash{ $a } <=> $hash{ $b } } keys %hash; print $_, " ", $hash{ $_ }, "\n" foreach ( @sorted_keys );

Update fixed terminology

----------------------------------------------------- Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain