in reply to Re^3: 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
That's a classic, most likely you are doing it wrong.
The only possibility top make it foolproof is to quote regex metacharacters and to anchor the line's start with ^
print if /^\Q$beginString/ .. /^\Q$endString/;
See quotemeta
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|