in reply to Variance in sort order (collation) {Solved: needed sharper eyes}
should be:$last[$a] cmp $last[$b] or $first[$a] cmp $last[$b]
my @index = sort { $last[$a] cmp $last[$b] or $first[$a] cmp $first[$b] } 0 .. $#first; sort on multiple keys Adler, Rich Jackson, Jon Jones, Fred Jones, John Smith, Joe Smith, John But, testing, single sort (cmp): Fred Joe John John Jon Rich
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variance in sort order (collation)
by ww (Archbishop) on Feb 21, 2012 at 02:43 UTC |