All pastes #403108 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-20 05:03 UTC
rendered paste body
#!/usr/bin/perl
#

my %wordlist;

# First, generate at most 1000 different four letter combinations
for(my $i=0; $i < 1000; $i++){
        my $key = chr(97 + rand(26)) . chr(97 + rand(26)) . chr(97 + rand(26)) . chr(97 + rand(26));
        $wordlist{$key} = $i;
}

# Now outpu 10,000 lines, each holding one of our unique "words"

my @words = keys %wordlist;

for(my $i=0; $i < 10000; $i++) {
        print $words[rand($#words)]."\n";
}