in reply to Re^3: Words in Words
in thread Words in Words
Sorry, but only comparing words with those that come after it alphabetically doesn't work.
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.
chomp (my @words = sort { length($a) <=> length($b) } sort <DATA>);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Words in Words
by sarchasm (Acolyte) on Sep 30, 2011 at 23:18 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2011 at 10:54 UTC | |
by choroba (Cardinal) on Oct 01, 2011 at 13:43 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2011 at 19:01 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2011 at 14:55 UTC | |
by choroba (Cardinal) on Oct 01, 2011 at 19:09 UTC | |
| |
by sarchasm (Acolyte) on Oct 02, 2011 at 20:28 UTC | |
by choroba (Cardinal) on Oct 02, 2011 at 20:55 UTC | |
| |
by BrowserUk (Patriarch) on Oct 01, 2011 at 00:40 UTC |