You can avoid that with \Q$EXPR\E.
In reply to Re: String substitution by moritz in thread String substitution by abhay180