http://qs321.pair.com?node_id=1161617


in reply to Re: Comparing Lines within a Word List
in thread Comparing Lines within a Word List

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.