update: looked up precedence table and spaceship (<=>) and cmp have much higher priority than I thought, so I guess this is ok either way.
@a = sort { $a->{key1} <=> $b->{key1} or $a->{key2} <=> $b->{key2} } @a;
In reply to Re^2: sorting array of hashes using multiple keys conditionally
by Marshall
in thread sorting array of hashes using multiple keys conditionally
by mabman2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |