in reply to Logic for sorting of this given array
The logic for multiple sorting is as follows,
That works by the lazy evaluation of logical operators. If comparison by level is not a tie, the department comparison is not made.my @sorted = sort { $a->{'level'} <=> $b->{'level'} || $a->{'department'} cmp $b->{'department'} } @array;
After Compline,
Zaxo
|
|---|