the code looks good for me,
try to show a minimal working (and intended) example reading text from DATA and having @terms populated.
personally I would code it with something like
$clause= join "|", @terms; print $1 while m/UP($clause)LB/g;
(untested)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: Comparing string to array elements
by LanX
in thread Comparing string to array elements
by R56
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |