Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Simon Davey

by physgreg (Scribe)
on Aug 19, 2002 at 09:44 UTC ( #191122=note: print w/replies, xml ) Need Help??


in reply to Looking for numeric sort (was Simon Davey)

The internal perl sort command can be used to sort numerically:
@sorted_list = sort {$a<=>$b} @unsorted_list
The <=> operator returns 0 if the two numbers are equal, -1 if $a<$b and 1 if $a>$b. Hope that helps.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-08-19 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?