in reply to Sorting multi dimensional arrays

You could sort each array reference individually, and then use some hybrid "merge" on them. But I'd suggest flattening them, and then unflattening them:
my @flat = sort { $a <=> $b } map @$_, @orig; my @sorted = map [ $orig[3*$_ .. 3*$_+2] ], 0 .. $#flat/3;


japhy -- Perl and Regex Hacker