This is a good, clear solution (++). However it looks like there is an off-by-one error in the while condition which means that the last two entries of @words are not compared against each other. If we change it to
while ( @words > 1 ) {
then it seems to cover that case as well.
In reply to Re^2: Comparing Lines within a Word List
by hippo
in thread Comparing Lines within a Word List
by dominick_t
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |