my %statistics; undef @statistics{ 1..10 }; # or @statistics{ 1..10 } = (0) x 10 say join "\n", sort { $a <=> $b } keys %statistics;