in reply to Win32::TieRegistry question
As for your second question,
Why in a record with single quotes if that is the case?
You need to escape backslashes (\) and the string delimiter in non-interpolating strings.
print('\\a\'b'); # Prints: \a'b
For convenience, an exception was made in unambiguous situations. In other words, a backslash only needs to be escaped when it is followed by another blackslash or by the string delimiter.
print('\\\\a'); # Prints: \\a print('\\\a'); # Prints: \\a print('\\a'); # Prints: \a print('\a'); # Prints: \a print('\\\\\''); # Prints: \\' print('\\\\''); # Syntax error print('\\\''); # Prints: \' print('\\''); # Syntax error print('\''); # Prints: '
For a program, it's easier to escape backslashes and the string delimiter unconditionally (C:\\Docum...) while humans might opt to omit the optional backslashes for the sake of readability (C:\Docum...).
The returned value (a *string*) doesn't have doubled slashes, just the output of Data::Dumper (a *string literal*).
|
|---|