gube has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
If i sort the array text after sort i want the output in the alphabetical order, By ignoring upper case and lower case. please help me.
@array = qw(ABU gubu abu GUBU babu BABU); @array = sort {$a cmp $b} @array; print "@array"; Getting o/p : ABU BABU GUBU abu babu gubu Expected o/p : abu ABU babu BABU gubu GUBU
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to sort in this upper / lower case?
by Aristotle (Chancellor) on Dec 26, 2005 at 12:49 UTC | |
|
Re: How to sort in this upper / lower case?
by tirwhan (Abbot) on Dec 26, 2005 at 12:42 UTC | |
|
Re: How to sort in this upper / lower case?
by TedPride (Priest) on Dec 26, 2005 at 21:41 UTC | |
by Aristotle (Chancellor) on Dec 27, 2005 at 09:31 UTC | |
|
Re: How to sort in this upper / lower case?
by ambrus (Abbot) on Dec 26, 2005 at 22:26 UTC |