I have this assignment we have to create a simple spell checker we have 1 file called words.txt that contains like 4,000 words and than we have another file called text.txt that contains just random words some are mispelled this is my program.
open INFILE, "words.txt" or die "can't open file $!";
while ($word = <INFILE>)
while ($word = <>)
print "$word is mispelled\n";
The problem that I am having is that my text.txt file contains something like this.
more cat lose
pat red persan
when I run the program it prints them together like
more cat lose is mispelled instead of breaking them apart.
Thanks, any help or advice would be useful =)