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

Re: schwartzian transform and sorting on two columns

by BUU (Prior)
on Sep 07, 2005 at 20:54 UTC ( [id://489998]=note: print w/replies, xml ) Need Help??


in reply to schwartzian transform and sorting on two columns

It sounds like you want:
sort { $a <=> $b or $c cmp $d }

Replies are listed 'Best First'.
Re^2: schwartzian transform and sorting on two columns
by thor (Priest) on Sep 08, 2005 at 13:19 UTC
    I know that $a and $b are perl's special variables that are used in sort, but these new $c & $d variables are a mystery...

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-26 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found