In Perl, I want to sort the keys of a hash by value, numerically:
{
five => 5
ten => 10
one => 1
four => 4
}
producing
Please see the Perl FAQ entry titled "How do I sort a hash (optionally by value instead of key)"
http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-a-hash-%28optionally-by-value-instead-of-key%29?
You can also use perldoc -q to search the FAQ locally on your machine, as in perldoc -q sort, which is how I found your answer.