note
Lotus1
<blockquote><i>Sorry, but only comparing words with those that come after it alphabetically doesn't work.</i></blockquote>
<p>True, but in the solution I posted I sort by length after the alphabetical sort. The alphabetical sort is probably overkill but needed for this particular solution.</p>
<c>
chomp (my @words = sort { length($a) <=> length($b) } sort <DATA>);</c>
928877
928934