Problems? Is your data what you think it is? | |
PerlMonks |
Re: Sort a two-dimensional array?by dempa (Friar) |
on Dec 20, 2002 at 22:14 UTC ( [id://221524]=note: print w/replies, xml ) | Need Help?? |
In your sort, $a and $b are references to arrays. To access the first row (row 0) you need to dereference the arrays first. Change $a and $b to ${$a}[0] and ${$b}[0] in your sort routine. --
In Section
Seekers of Perl Wisdom
|
|