http://www.perlmonks.org?node_id=998109


in reply to Numeric sorting WITHOUT <=>

Don't use the C for loop, especially when you can't remember the order of the parts in the ()! Instead use a Perl for loop:

for my $key (0 .. 100) {

which is not only clearer and shorter, but will actually do what you want.

True laziness is hard work