I am trying to replace a ( with \( using a regular expression in perl. This is proving to be problematic.
$var =~ s/\(/\\\(/g
does not seem to work. The expression is not escaping the backslash a second time and the result is \\(
Any tricks to make this work?
Thanks.
You guys were right. My code does work. It was displaying differently in the command line because it was not interpreting it. Sorry for the wasted time.
How about this: