Gossamer Forum
Home : General : Perl Programming :

Case Insensitive Sort

Quote Reply
Case Insensitive Sort
 
I'm using the sort function on an array and it sorts the upper case words b4 the lower case words.

What will sort just alphebeticaly.

Thanks,

perlkid

Quote Reply
Re: Case Insensitive Sort In reply to
@array = sort {lc $a cmp lc $b} @array;

--mark

Installation support is provided via ICQ at UIN# 53788453. I will only respond on that number.
Quote Reply
Re: Case Insensitive Sort In reply to
 
Thanks Mark,

That worked great. Smile

perlkid