Single-quoted Strings
- Each character is the character it shows, except...
- To put in a single-quote, backslash it.
$song = 'Ain\'t Misbehavin\'';
- To put in a backslash, backslash it.
$path = 'k:\\perl\\docs';
- Can even contain newline characters:
$signoff = 'xoxo, Andy'; The string
above contains 10 characters. |
|
|