skyler has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $infile = 'c:/RX_Q.008'; my $outfile = 'c:/testfile.txt'; open IN, "<$infile" or die "Couldn't open $infile, $!"; open OUT,">$outfile" or die "Couldn't open $outfile, $!"; my @finds = qw( 77403 77404 77406 77407 77408 77409 77411 77412 77413 +77414 77416 77418 ); my $finds_re = join '|', map { quotemeta }@finds; $finds_re = qr/$finds_re/; while(<IN>) { next if m/$finds_re/; print OUT; } close IN;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: rename output file with system date
by graff (Chancellor) on May 28, 2003 at 04:18 UTC | |
by Skeeve (Parson) on May 28, 2003 at 06:31 UTC | |
by skyler (Beadle) on May 28, 2003 at 04:47 UTC | |
by graff (Chancellor) on May 28, 2003 at 05:04 UTC |