| Start |
|---|
| String Literal Quoting String literals imply no escaping or interpolation ( with the exception of quoting string terminators ) You can use alternative quoting mechanisms to avoid clashes: Certain chosen quote characters are "balanced" |
| Double-quoting Double-quoted strings use interpolation and escaping – unlike single-quoted strings. To double-quote a string, use either double quotes The ... which just isn't as nice. Perl doesn't limit you to using a slash You can also interpolate arrays into strings. By default the values are space-separated – because the special variable If you prefer, you have the option to For anything more complex than this, you should use a loop instead. Interpolation does not work with hashes. Some code abuses interpolation of references – avoid it. The so-called "cart operator" causes perl to dereference The Instead, consider writing:
|
| Heredocs Large Multi-Line strings are burdensome to write. NB: Make sure you ignore stack-overflows syntax highlighter: It is very wrong. And Interpolated Heredocs work the same way. Pending in 5.26.0* is an "Indented Heredoc" Syntax which trims left-padding off for you |
| Removing trailing newlines The function You can also But usually, no one worries about how many newlines were removed, so RemarksThe version syntax doesn't allow us to guard off versions that don't exist yet, so this is a reminder for somebody to go back and edit them in once it lands( RE: Perl 5.26 ). The version guards rather need to have a "future" classification for tentative features that might be available to people brave enough to do a source checkout. |
Read Article
https://develop.horje.com/learn/1434/reference