for $key ( sort {$a<=>$b} keys %hash) { print "($key)->($hash{$key})\n"; }