my @junk = map {chomp $_; qr/\Q$_\E/} ; while (<>) { next if $_ =~ $junk foreach my $junk (@junk); print; }