in reply to Re^2: Permanently sort a hashin thread Permanently sort a hash
my @sorted_keys = sort { $a <=> $b } keys(%foo); print join("\n",@hash{@sorted_keys}) [download]