There is also index. It returns -1 if the string is not found.
or my @found = grep {-1 != index $content, $_} @array;local $/; my $contents = <IN>; close IN; my @found; for (@array) { next if -1 == index $contents, $_; push @found, $_; }
After Compline,
Zaxo
In reply to Re: Match a string only once in a file
by Zaxo
in thread Match a string only once in a file
by newbie2perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |