$wordlist = '/usr/share/dict/words'; open DICTIONARY, $wordlist; @words = <DICTIONARY>; chomp(@words); $number = scalar(@words); $random = rand; $choice = lc($words[$number * $random]);