in reply to How do I sort a multidimensional arrays?

Do note that "sort by X", "sort by Y", then "sort by Z" only gives you deterministic results if all values are unique, or if you are using a stable sort. Since perl 5.6, the default sort in Perl is stable, but this may chance in the future.

Sorting by column D, then by C, then by F seems to quite different to me than sorting by index 5, then by index 2, then by index 3 (opposite order). Even if you reverse the orders so they match, then it will still depend on the spreadsheet. While one spreadsheet may use a stable sort, another may not.

  • Comment on Re: Answer: How do I sort a multidimensional arrays?