Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sorting on identical values

by holli (Abbot)
on Aug 08, 2019 at 17:26 UTC ( [id://11104189]=note: print w/replies, xml ) Need Help??


in reply to Sorting on identical values

You want a schwartzian transform. Basically
my @sorted_urls = map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { m|/search/([^\?]+)\?|; [$_, $1] } @urls;


holli

You can lead your users to water, but alas, you cannot drown them.

Log In?
Username:
Password:

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

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

    No recent polls found