Help for this page
use strict; use warnings; ... print "Unsorted:\n" ,Dumper \%hash; print "==========\n"; print "Sorted:\n", map "$_, $hash{$_}\n", sort {$hash{$a} cmp $hash{$b +}} keys %hash;
$ perl sort_hash.pl Unsorted: ... John Hill, CA Ted McCain, TX John Evans, WI