more useful options | |
PerlMonks |
Re: sorting a two dimensional array by one columnby bigj (Monk) |
on Jul 14, 2003 at 15:32 UTC ( [id://274005]=note: print w/replies, xml ) | Need Help?? |
In addition to the others, there is a shorter way to sort for the first column of a two dimensional array: my @sorted = sort {"@$a" <=> "@$b"} @two_dim; But please don't use it in production code :-) Greetings,Janek
In Section
Seekers of Perl Wisdom
|
|