sort { $hash{$a} <=> $hash{$b} } values %hash; #### # list of sorted keys in numeric order my @keys = sort { $a <=> $b } keys %hash; # list of values in numeric order my @values = sort { $a <=> $b } values %hash; # a list of the *keys* sorted by their corresponding value my @keys_by_value = sort { $hash{$a} <=> $hash{$b} } keys %hash;