in reply to Unwanted interpolation in backquoted string

The $2 is being interpreted by perl. Put a backslash before it and you should be good to go.

Turning on warnings is what gave me the hint to tell me why this wasn't working.