Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Sorting (GRT) and locale issues

by salva (Canon)
on Nov 15, 2007 at 09:22 UTC ( [id://650939]=note: print w/replies, xml ) Need Help??


in reply to Sorting (GRT) and locale issues

Instead of the GRT, you can use the module Sort::Key::Multi that is faster, much easier to use and supports locale-aware sorting:
use Sort::Key::Multi qw(is_keysort il_keysort); # 'is_' and 'il_' indicate the sorting key types, # in that case: # is = integer + string # il = integer + locale_string my @sorted = is_keysort { (/(.)(.*)/)[1,0] } @data; my @locale_sorted = il_keysort { (/(.)(.*)/)[1,0] } @data;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found