#!/usr/bin/perl -w

# First load up the dictionary
open(DICT, "</usr/dict/words") || die "Unable to open dict";
while( $word = <DICT> ) {
	$words{$word} = 1;
}

# Get words to look up
print "Enter a word to look up\n";
while ($word = <STDIN>) {
	if (defined($words{$word})) {
		print "Found\n";
	}
	else {
		print "No Found\n";
	}
	print "Enter a word to look up\n";
}
