It will be easier and most probably more efficient to store your words in a hash and check for existence of your candidates in the hash.
Something like this:
my $word = "of"; my %stopwords = map { $_ => 1 } qw/ a the of /; if (exists $stopwords{$word}) { print "Stopword $word discarded\n"; } else{ print "$word is not a stop word\n"; }
In reply to Re: grep match variable position
by Laurent_R
in thread grep match variable position
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |