local $/; my $contents = ; close IN; my @found; for (@array) { next if -1 == index $contents, $_; push @found, $_; }