#!/usr/bin/perl -w use strict; my($word) = $ENV{'QUERY_STRING'}; my($match)=""; my($test)="A"; my($out) =""; $word = uc("$word\n"); print("Content Type: text/text\n\n"); open(DICT,"ospd.txt"); while(!$match && $test){ $test = ; if ($word eq $test){ $out="Matched\n"; $match=$word; } if (length($word)< length($test)){ $match="*"; $out="Failed\n"; } } if (!$match){ $out="Failed\n"; } $match=""; open(DICT,"ospdadd.txt"); while(!$match && $test){ $test = ; if ($word eq $test){ $out="Matched3\n"; $match=$word; } if (length($word)< length($test)){ $match="*"; } } $match=""; open(DICT,"ospdsub.txt"); while(!$match && $test){ $test = ; if ($word eq $test){ $out="Matched2\n"; $match=$word; } if (length($word)< length($test)){ $match="*"; } } print("$out");