Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: a sort question

by duff (Parson)
on Jun 06, 2007 at 18:58 UTC ( #619647=note: print w/replies, xml ) Need Help??


in reply to a sort question

And just to clarify, perl's sort routine does not only do numeric or string sorting. It sorts based on any arbitrary criteria you choose as long as you're willing to write a binary tri-state comparator that has the same semantics as  <=> or cmp (i.e., returns -1 for less then, 0 for equal and 1 for greater than)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2021-10-23 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?