in reply to Perl script to print Next line after Pattern Matching
use strict; use warnings; for my $file (<*.doc>) { open my $fh, "<", $file or die $!; while (<$fh>) { print scalar <$fh> if /^Customer ID: Yes/; } }
mr.nick ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl script to print Next line after Pattern Matching
by jwkrahn (Abbot) on Dec 20, 2011 at 22:05 UTC | |
by Anonymous Monk on Dec 21, 2011 at 04:04 UTC | |
by Anonymous Monk on Dec 21, 2011 at 15:12 UTC |