http://qs321.pair.com?node_id=814364


in reply to Re: Sorting integer value hash keys
in thread Sorting integer value hash keys

Sorry, I can't resist:
my %statistics; undef @statistics{ 1..10 }; # or @statistics{ 1..10 } = (0) x 10 say join "\n", sort { $a <=> $b } keys %statistics;
or, if you don't need a name and like the 0 values:
say join "\n", sort { $a <=> $b } keys %{{ map { $_ => 0 } 1..10 }}