in reply to Re: Modifying A Bunch of Files by replacing specific lines
in thread Modifying A Bunch of Files by replacing specific lines

You'll probably want to do this:

next unless /\Q$markers{END}\E/;

and the same for the other pattern match. This ensures that your markers string gets seen as a literal string to match, not as a pattern itself. Especially if you are using < and > which tend to have meanings within regexes.

dave hj~