for my $key (sort {$a<=>$b} keys %hash){ print $hash{$key} }