#!usr/bin/perl my $a = 1; %hash = map { $_ , undef } 0 .. 3; @h = sort {$a <=> $b} keys %hash; print "@h\n"; __END__ 0 3 2 1