Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Sorting Question

by geekgrrl (Pilgrim)
on Oct 04, 2004 at 18:53 UTC ( #396336=note: print w/replies, xml ) Need Help??


in reply to Re^2: Sorting Question
in thread Sorting Question

although you may want to actually sort alphabetically (ie case-insensitive) instead of ASCIIbetically:
@list = sort { lc $a cmp lc $b } @list;

Replies are listed 'Best First'.
Re^5: Sorting Question
by allolex (Curate) on Oct 05, 2004 at 16:30 UTC

    Which is why it's often a good idea to use locale when sorting. Then you don't have to contort yourself so much to get good sorting results.

    --
    Damon Allen Davison
    http://www.allolex.net

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-07-07 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?