Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

( #552448=categorized answer: print w/ replies, xml ) Need Help??

Q&A > sorting > How do I do a natural sort on an array? 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;

Comment on Answer: How do I do a natural sort on an array?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-07-25 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls