Sort::ArrayOfArrays was written to sort an arbitrary array of arrays, in powerful, different ways. WWW: http://search.cpan.org/dist/Sort-ArrayOfArrays/