Double-quoted Strings
- Allows numerous control sequences
- Allows variable interpolation
$basename = "myfile";
$datafile = "$basename.dat";
$idxfile = "$basename.idx";
Some
control sequences
\n newline \t tab \e escape \x7F hex sequence (here, hex
7F) \007 octal
sequence (here, hex 07, or bell) \Cg control character (here, Ctrl-G, or
bell) \"
doublequotes \\
backslash
- Remember that if you use backslashes in path names, you must escape
them.
"c:\temp" is
actually "c:<tab>emp" "c:\\temp" or 'c:\temp'
is what you want
- Fortunately, Perl allows forward slashes as separators in
filenames
"c:/temp"
works, too. |
|
|