I'm trying to sort my array of arrays using the following code but it doesn't seam to be working. Any ideas why anyone?
# assign to our array, an array of array references
@AoA = (
[ "$price[0]", "$postage[0]", "$condition[0]", "$seller[0]" ],
[ "$price[1]", "$postage[1]", "$condition[1]", "$seller[1]" ],
[ "$price[2]", "$postage[2]", "$condition[2]", "$seller[2]" ],
);
@AoAsorted = sort { $a->[0] <=> $b->[0] } @AoA;
print "$AoAsorted[0]->[0]";
# assign to our array, an array of array references
@AoA = (
[ "$price[0]", "$postage[0]", "$condition[0]", "$seller[0]" ],
[ "$price[1]", "$postage[1]", "$condition[1]", "$seller[1]" ],
[ "$price[2]", "$postage[2]", "$condition[2]", "$seller[2]" ],
);
@AoAsorted = sort { $a->[0] <=> $b->[0] } @AoA;
print "$AoAsorted[0]->[0]";