in reply to print backslash in variable

The method you are using to set the variables (enclosing in single quotes) means that the backslashes are escaped by other backslashes. Your print statement is a good idea and is genuinely showing you the correct values of the variables. A quick read of Quote and Quote-like Operators may help to clear things up for you.

Replies are listed 'Best First'.
Re^2: print backslash in variable
by soonix (Chancellor) on Aug 18, 2015 at 08:28 UTC
    ... more exactly, first entry in subsection Quote-Like Operators (without "Quote and"). I guess this (and the "Regexp" and "Gory details" sections) should be subheadings under "Quote and Quote-like".