in reply to how to sort multi-dimensional arrays

Your problem is that @x has indices in the range (0..2), but $x[0][2] is not defined. Dereferencing an undefined element causes the error.

Update: fixed the range above.

-Mark