C:\>type data.txt foo bar foo bar foo foo C:\>perl -n -e "m/foo/ or print" data.txt > out.txt C:\>type out.txt bar bar C:\> #### #!/usr/bin/perl -w use strict; $ARGV[0] or die "Useage ./$0 file_to_process > output.file\n"; my @finds = qw( this that other ); my $finds_re = join '|', map { quotemeta }@finds; $finds_re = qr/$finds_re/; open F, $ARGV[0] or die $!; while() { next if m/$finds_re/; print; } close F;