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

Re: schwartzian transform and sorting on two columns

by ikegami (Patriarch)
on Sep 07, 2005 at 21:55 UTC ( [id://490011]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @sortedarry = map  { $_ ->[0] }
                  sort { $a->[1] cmp $b->[1] || $a->[2] <=> $b->[2] }
    ...
                  @foo;
    
    print "$_\n" foreach @sortedarry;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found