Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by ysth (Canon)
on Jul 31, 2015 at 21:25 UTC ( #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
Node Status?
node history
Node Type: note [id://1137063]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2018-01-24 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (256 votes). Check out past polls.

    Notices?