good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A fine node with one mistake:
prints "blah\blah". To put a literal \ in a Perl single-quoted string, you should use \\, just like with double-quoted strings. If the character after a \ (in a single-quoted string) doesn't happen to be ' or \, then the \ is preserved. But using this fact often leads to confusion like the mistake in your post, so I discourage people from doing that. I really wish Perl had used '' (two adjacents 's) to quote ' inside of 's. But my time machine is broken. In reply to RE: String Literals in Perl
by tye
|
|