and to make it more accurate, one might write it as (untested:)
my @stopwords= qw/ car pet carpet /; my $stopmatch= join '|' => map { '\b' . $_[1] . '\b' } ## match full words reverse sort { $a->[0] <=> $b->[0] } ## longest first map { [length $_, $_] } @stopwords;
Thus longer words will match first, and only full words will be matched.
~Particle *accelerates*
In reply to Re^3: next if attempt
by particle
in thread next if attempt
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |