in reply to Re: Re: regex for here doc?
in thread regex for here doc?

You probably want to set $/ to "\n$2", not just $2. At least, that's how heredocs usually work.