Perl's sorting algorithm will return '0' if the "cmp" is equal, defaulting to the secondary sort.@sorted = sort { <BR> $a->{'name'} cmp $b->{'name'} || $a->{age} <=> $b->{age} <BR> } @data; <BR>
In reply to RE: Re: Advanced Sorting
by dsdisc
in thread Advanced Sorting
by dsdisc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |