I have a simple Perl line
s/$var/'string'/g
The problem is that $ var contains a string like jkdlsf$lkjl . Pay attention to the dollar sign in the middle. It seems that because of this dollar sign, the replacement does not work. How to avoid this when it is inside a variable?
source share