in reply to random text

The Fortune module can do something similar. (Untested code below).

#!/usr/bin/perl use Fortune; my $fortune = Fortune->new($FORTUNE_FILE); print $fortune->get_random_fortune();

Update: Oops. Always understand the problem before creating a solution. You're creating a bunch of random words, whereas Fortune grabs a random quote.