in reply to Re: Perl reading in a file and getting a string in between two strings on different lines
in thread Perl reading in a file and getting a string in between two strings on different lines
my $beginString = "SEARCH"; my $endString = "TEST"; my $fileContent; open(my $fileHandler, $inputFile) or die "no read '$inputFile' $!\n"; while (<$fileHandler>) { print if /$beginString/ .. /$endString/; } close $fileHandler;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl reading in a file and getting a string in between two strings on different lines
by victorz22 (Sexton) on Apr 17, 2017 at 21:32 UTC | |
by LanX (Saint) on Apr 17, 2017 at 21:56 UTC |