We don't bite newbies here... much | |
PerlMonks |
Re^4: Perl reading in a file and getting a string in between two strings on different linesby LanX (Saint) |
on Apr 17, 2017 at 21:56 UTC ( [id://1188179]=note: print w/replies, xml ) | Need Help?? |
Show input that doesn't work! See SSCCE 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
In Section
Seekers of Perl Wisdom
|
|