when designing a website, I find the hardest thing to be filling in some dummy text that doesn't look like I cut'n'pasted the same line a thousand times... so here's a snippet that gives you a somewhat random paragraph.
# how many words to write. my $length = $ARGV[0] || 20; # dictionary file to use. my $dict = '/usr/share/dict/words'; open DICT, '<', $dict or die "Cannot open dictionary file: $!\n"; chomp(my @list = <DICT>); close DICT; print $list[rand(@list)], ' ' for (1 .. $length);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: random text
by PodMaster (Abbot) on Dec 30, 2002 at 13:27 UTC | |
by mojotoad (Monsignor) on Dec 30, 2002 at 18:25 UTC | |
|
Re: random filler text
by Aristotle (Chancellor) on Dec 30, 2002 at 15:36 UTC | |
by LTjake (Prior) on Dec 30, 2002 at 18:39 UTC | |
|
Re: random text
by hardburn (Abbot) on Dec 30, 2002 at 17:28 UTC |