#!/usr/bin/perl use strict; my $DICT = '/usr/dict/words'; my ($num) = @ARGV; my ($i, $total, $mult, @words); $num ||= 100; if (!open(IN, $DICT)) { print "\n$! - $DICT\n\n"; exit; } $total = @words = ; $mult = $total / $num; for $i (1..$num) { print splice(@words, rand(@words), 1); } print "$total words in dictionary.\n"; print "Multiply number of words known in this list by $mult.\n";