Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (sorting)
I have an array of arrays which I need to sort according to the value of the second element of the anonymous arrays that are being referenced by the named array. (did that make sense?)
How do I do this exactly?
@array = [8,9,10], [4,5,6], [7,8,9]; # This is the array of arrays I need to sort # by second elements. # Magic step goes here.... # I need to end up with an array like @sorted: @sorted = [4,5,6], [7,8,9], [8,9,10];
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I sort a multidimensional arrays?⭐
by reptile (Monk) on May 28, 2000 at 23:59 UTC | |
by merlyn (Sage) on May 29, 2000 at 19:05 UTC | |
by reptile (Monk) on May 30, 2000 at 01:50 UTC | |
Re: How do I sort a multidimensional arrays?
by chromatic (Archbishop) on Jun 06, 2000 at 03:13 UTC | |
Re: How do I sort a multidimensional arrays?
by tlm (Prior) on Mar 15, 2005 at 23:55 UTC | |
Re: How do I sort a multidimensional arrays?
by flope (Initiate) on Mar 15, 2005 at 13:51 UTC | |
Re: How do I sort a multidimensional arrays?
by Anonymous Monk on Feb 06, 2003 at 16:24 UTC |
Back to
Seekers of Perl Wisdom