"I don't think anyone should write their autobiography until after they're dead." - Samuel Goldwyn
Question #2084 posted on 12/19/2003 12:38 a.m.
Q:

Dear Readers:

A week or so ago, someone asked a question if there was a list of words in the english language, sorted by length. Such a list now exists:

http://theboard.byu.edu/filelib/sorted-word-list.txt

Brought to by Grady Ward, 9 lines of perl, 10 minutes, and Yours Truly.

-- Misaneroth

For the curious, the perl script is:

#!/usr/bin/perl
@wordlist = ();
while($w = <>) {
next unless ($w =~ /^[a-zs]+$/);
push @{$wordlist[length($w)]}, $w;
}
foreach $c (@wordlist) {
foreach (sort @{$c}) { print; }
}