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;
In reply to Re^2: Perl reading in a file and getting a string in between two strings on different lines
by Anonymous Monk
in thread Perl reading in a file and getting a string in between two strings on different lines
by victorz22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |