It depends on the type of literal.
- In double-quoted strings literals, \, $, @ and " must be escaped. Many other characters may be escaped (but definitely not letters).
- In qq string literals: \, $, @ and the string delimiter must be escaped. Many other characters may be escaped (but definitely not letters)
- In <<... string literals: \, $, @ must be escaped. Many other characters may be escaped (but definitely not letters)
- In <<"..." string literals: \, $, @ must be escaped. Many other characters may be escaped (but definitely not letters)
- In single-quoted string literals: \ and ' (and no other character) must be escaped.*
- In q string literals: \ and the string delimiter (and no other character) must be escaped.*
- In <<'...' string literals: \ (and no other character) must be escaped.*
* – \ does not need to be escaped in single-quoted and similar string literals if it's followed by a character that doesn't need to be escaped.
| [reply] [d/l] [select] |
hey,
thanks for your asnwer!
grtz,
Fred
| [reply] |