Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Answer: How do I do a natural sort on an array?

by salva (Abbot)
on May 30, 2006 at 10:12 UTC ( #552448=categorized answer: print w/replies, xml ) Need Help??

Q&A > sorting > How do I do a natural sort on an array? - Answer contributed by salva

Sort::Key::Natural is fast, can handle numbers of unlimited size and doesn't have problems with unicode:
use Sort::Key::Natural qw(natsort); my @sorted = natsort @data;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-08-22 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (342 votes). Check out past polls.

    Notices?