Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sorting Alphanumeric Arrays

by ikegami (Patriarch)
on Jun 13, 2005 at 20:05 UTC ( [id://466271]=note: print w/replies, xml ) Need Help??


in reply to Sorting Alphanumeric Arrays

Sort numerically, but switch to alphabetical for ties:

@new = sort { no warnings; $a <=> $b || $a cmp $b } @old;

Replies are listed 'Best First'.
Re^2: Sorting Alphanumeric Arrays
by slloyd (Hermit) on Jun 13, 2005 at 20:09 UTC
    Thank you! perfect!

    http://www.basgetti.com

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-24 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found