|Pathologically Eclectic Rubbish Lister|
Sorting arrayby rkk (Novice)
|on Jun 14, 2013 at 22:19 UTC||Need Help??|
rkk has asked for the
wisdom of the Perl Monks concerning the following question:
I need some suggestion regarding sorting an array.
But, if I have an array like the following
@arr=((ch1,100), (ch2,20), (ch1,13), (ch2,45), (ch1,1));
How to sort this kind of array (first sort first element and then sort by second element)
Sample output should be,
4 0 2 1 3
Any suggestions, please advise.