Help for this page
for my $k (sort keys %hash) { print "$k $hash{$k}\n"; }
my @ordered_keys = sort { order($hash{$a}, $hash{$b}) } keys %hash; for my $k ( @ordered_keys ) { ... # -1 if $left must come *before* $right, 0 if they are # equivalent, +1 if $left must come *after* $right }