Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Numeric sorting WITHOUT <=>

by GrandFather (Cardinal)
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


Comment on Re: Numeric sorting WITHOUT <=>
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (15)
As of 2014-11-24 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (147 votes), past polls