Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Advanced Sorting - GRT - Guttman Rosler Transform

by ysth (Canon)
on Jul 31, 2015 at 21:25 UTC ( [id://1137063]=note: print w/replies, xml ) Need Help??


in reply to Re: Advanced Sorting - GRT - Guttman Rosler Transform
in thread Advanced Sorting - GRT - Guttman Rosler Transform

The hardest part is inverting the portions of the key which must sort descending.
If the entire key is descending, you don't need to invert it; just using sort { $b cmp $a } is good enough. sort will recognize that specific code and not actually call the code block.
--
A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-19 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found