in reply to How do I sort a hash by its values?
But in short:
@keys = sort { $hash{$b} <=> $hash{$a} } keys %hash; [download]