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

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

my %statistics = ( 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0 ); foreach my $statistic (sort keys %statistics) { print $statistic ." ".$statistics{$statistic}. "\n"; }
Are keys always of type string? If not, why is 10 printed after 1 instead of 2? How do I sort as: 1,2,3...10. Thanks.