I have a simple line of Perl
s/$var/'string'/g
The issue is that $var contains a string like jkdlsf$lkjl. Note the dollar sign in the middle. It seems because of this dollar sign the replace is not working. How do I escape this when it is inside a variable?