) { chomp; $wordlist{$_} = 1; } close $DATA; } else { die "Unable to open the wordlist file '$datafile': $!\n"; } @checkwords = ( "Aarhus","Aaron","Ababa","aback", "abaft","abandon","abandoned", "abandoning","abandonment", "abandons","abase","abased", "abasement","abasements", "abases","abash","abashed","abashes", "abashing","abasing","abate","abated", "abatement","abatements","abater", "abates","abating","Abba", "abbe","abbey","abbeys","abbot", "abbots","Abbott", "abbreviate","abbreviated", "abbreviates","abbreviating", "abbreviation","abbreviations", "Abby","abdomen","abdomens", "abdominal","abduct","abducted", "abduction","abductions","abductor", "abductors","abducts","Abe","abed", "Abel","Abelian","Abelson","Aberdeen", "Abernathy","aberrant","aberration", "aberrations","abet","abets", "abetted","abetter", "abetting","abeyance","abhor", "abhorred","abhorrent","abhorrer", "abhorring","abhors","abide","abided", "abides","abiding","Abidjan","Abigail", "Abilene","abilities","ability","abject", "abjection","abjections","abjectly", "abjectness","abjure","abjured", "abjures","abjuring","ablate", "ablated","ablates","ablating", "ablation","ablative","ablaze", "able","abler","" ); } sub spell_check { my $word = shift; return exists $wordlist{$word}; } my $cgi = new CGI; my $counter = $cgi->param('counter') || 1; if ($counter < 1) { $counter = 1; } my $next = $counter + 1; my $url = "spell.plex?counter=$next"; if ($next > 25) { $url = "frame_perl.plex?script=spell.pl&runs=25"; } # we never spell check $checkwords[0] :( # sanity check: make sure the word is actually in the wordlist unless ( spell_check($checkwords[$counter]) ) { die "$checkwords[$counter] not found in dictionary?"; } print "Content-Type: text/html\r\n\r\n"; print < PerlEx Performance

$counter

PerlEx

EOF