Re: Can someone tell whats wrong with this code?

Marc Langheinrich (marclang@cs.washington.edu)
Thu, 25 Mar 1999 11:43:13 +0900


On Wed, Mar 24, 1999 at 04:56:40PM -0800, Rick Tuinenburg wrote:
> how can I sort this correctly?
This is not really a libwww question, nor actually a perl question per se,
since you're trying to sort a two-dimensional array (i.e. a matrix) here,
but the sort function operates on (one-dimensional) lists only.  Although
one shouldn't answer such OFF-topic posts I already spent so much time on
the flame, I might as well include a "fix":
 ... @cool_line_one = sort(@{$cool[1]}); foreach $item(@cool_line_one) ...

--
Marc Langheinrich
marclang@cs.washington.edu