Let me see if I understand your problem: you have a list of strings, such as "bar", "bartender", and "foobar". You want to get rid of any duplicates, but you have to make sure that "bar" won't match against "bartender" or "foobar".
First solution that comes to mind is to ignore the regex and simply use string eq:
next if($word eq $w);If you really need a regex for some reason, use \s to match whitespace around the word:
next if($word =~ /\s$w\s/);In reply to Re: Word Evaluation
by hardburn
in thread Word Evaluation
by PerlRookie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |