in reply to Re^2: If I Want Backslashes, I'll Ask For Backslashes
in thread If I Want Backslashes, I'll Ask For Backslashes
Well, you've gotta have \\... how else do you write the escape character? Without \\, '\' is a syntax error, so you need some way of getting the escape character into the string - and doubling it seems to be common convention. However, in the single-quoted here doc, it becomes unnecessary as the only thing that could possibly need escaping is the ending string - and, um... well, if you need to escape that, then I suggest picking a better end string. :-)
Update: Well, John's right - but the need does exist to include the quoting character inside the string, and if the escape character is at the end of the string, there needs to be some way to do that without causing the interpreter to freak out.
His Royal Cheeziness
|
|---|