@arr2 = sort {$$a {cat} cmp $$b {cat} || $$a {name} cmp $$b {name} || $$a {rating} cmp $$b {rating}} @arr1;
Then you would only spend time comparing names and ratings if the 'cat's are identical.
Abigail
In reply to Re: Complicated, multi-level array sorting
by Abigail-II
in thread Complicated, multi-level array sorting
by nutshell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |