The problem that I am having is that my text.txt file contains something like this. Ex 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 =)open INFILE, "words.txt" or die "can't open file $!"; while ($word = <INFILE>) { chomp($word); $dict{$word}=1; } while ($word = <>) { chomp($word); @words=split//,$word; if(!exists $dict{$word}) { print "$word is mispelled\n"; } }
In reply to Reading Files by perlguru22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |