in reply to Re: Advanced Sorting
in thread Advanced Sorting
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>
|
|---|