Double-quoted strings are very similar to C with many special characters given in table 2-1 of Llama book and online PERL man page. (See later in foils)
-
Examples: \n is newline, \t is tab and \cC is Control-C
-
Example: 'Hello
-
World' is equivalent to "Hello\nWorld"
-
Note \L instructs PERL that all following characters until a \E are to be interpreted as lower case
-
\U ... \E is similar but intervening characters are upper case
|
A critical feature of double-quoted strings is that they "interpolate" variables (e.g., with $ as initial character). For this reason use \$ to denote a literal dollar sign in a double-quoted string.
|
Variables are NEVER interpolated in single-quoted strings
|