in reply to Re^5: best sort
in thread best sort
is unnecessary if the sort is stable, as sort() is, by default. Since different words can compare equal under the influence of$a->{RECNO} <=> $b->{RECNO}
(if I'm correctly guessing what DICTFOLD is), I still might see$a->{DICTFOLD} cmp $b->{DICTFOLD}
in the sorted output, when I might have preferredword Word word Word
which makes it easier to determine if words are "unique" without repeating all the complicated logic. So I would preferword word Word Word
as the final tie-breaker. That's neither better nor worse than your code, merely different.$a->{ORIGINAL} cmp $b->{ORIGINAL}
|
|---|