Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Simon Davey

by physgreg (Scribe)
on Aug 19, 2002 at 09:44 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found