Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: sorting a list according to numeric values using the function splice()

by sundialsvc4 (Abbot)
on Aug 09, 2010 at 13:24 UTC ( [id://853811]=note: print w/replies, xml ) Need Help??


in reply to sorting a list according to numeric values using the function splice()

FYI:   As you will see from perldoc -f sort, the sort function allows a comparison-subroutine to be defined.   This might be important in achieving the results that you want, although Perl is already pretty smart at “doing the right thing.”   If you, for example, needed to sort a list of structures, or to perform a sort using multiple keys, this is how you do it.

  • Comment on Re: sorting a list according to numeric values using the function splice()

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found