You may want the index function. It returns -1 if there is no exact match.
for (@array) { do {something($_)} if -1 != index( $_, 'bar'); }
For more complicated matching, you probably want a regex match,
# . . . if m/foo|bar|baz/;
After Compline,
Zaxo
In reply to Re: find text in string
by Zaxo
in thread find text in string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |