sandy_1028 has asked for the wisdom of the Perl Monks concerning the following question:
But I want in the order 1, 2, 2,4, 6,65, 93, 100, 205,2000@theList = (205, 4, 100, 1, 2, 2000, 6, 93, 2, 65); @theSortedList = sort { lc($a) cmp lc($b) } @theList; print join(',', @theSortedList)."\n";
How to do this. In perl sorting is based on the first character and takes the ascii values. Is there any way to sort in this order
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sort the array
by jwkrahn (Abbot) on Nov 10, 2008 at 07:02 UTC | |
by shekarkcb (Beadle) on Nov 10, 2008 at 11:37 UTC | |
by jwkrahn (Abbot) on Nov 10, 2008 at 11:53 UTC |