in reply to Re: Edit in place (part2)
in thread Edit in place (part2)

No, $myvar can safely contain any character. You only need to escape text interpolated into the regexp, not the replace string.