on Mon, 06 May 2002 14:17:39 GMT, [EMAIL PROTECTED] (Richard Adams) wrote:
[Please don't retype code - cut and paste instead]
> I've tried
> @sorted = {$a ->[2] <=> $b ->[2]} @AoA
You forgot the 'sort' function.
You put spaces before the '->'.
You got the sort order reversed.
Try
my @sorted = sort {$b->[2] <=> $a->[2]} @AoA;
for my $i(0..$#sorted) {
print $i+1, ":\t$sorted[$i][2]\n";
}
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
