blob: 076b2489fb0dea365605fd53ac2493506dc7818b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
```puppet
@(END) <- no str interpolation
@("END") <- quotes around END enable string interpolation ${}
@("END"/$) <- interpolation + we can escape from it using \$ for a literal $
END
| END
```
#### Escape sequences
|Switch to put in the heredoc tag|Escape sequence to use in the heredoc string|Result in the string value|
|---|---|---|
|(automatic)|`\\`|Single backslash. This switch is enabled when any other escape sequence is enabled.|
|`n`|`\n`|New line|
|`r`|`\r`|Carriage return|
|`t`|`\t`|Tab|
|`s`|`\s`|Space|
|`$`|`\$`|Literal dollar sign (to prevent interpolation)|
|`u`|`\uXXXX` or `\u{XXXXXX}`|Unicode character number `XXXX` (a four-digit hexadecimal number) or `XXXXXX` (a two- to six-digit hexadecimal number)|
|`L`|`\<New line or carriage return>`|Nothing. This lets you put line breaks in the heredoc source code that does not appear in the string value.
|