in reply to Match a string only once in a file
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
|
|---|