Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Numeric sorting WITHOUT <=>

by GrandFather (Sage)
on Oct 10, 2012 at 01:39 UTC ( #998109=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998109]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2016-12-04 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (64 votes). Check out past polls.