|
|
|
|
|
|
welcome |
|
Quote Constructs
Customary |
Generic |
Meaning |
Interpolates |
'' |
q// |
Literal string |
No |
"" |
qq// |
Literal string |
Yes |
`` |
qx// |
Command execution |
Yes |
() |
qw// |
Word list |
No |
// |
m// |
Pattern match |
Yes |
s/// |
s/// |
Pattern substitution |
Yes |
y/// |
tr/// |
Character translation |
No |
"" |
qr// |
Regular expression |
Yes |
Examples
These two are the same:
$x = "Hello";
$x = qq/Hello/;
q means quote. Here we have double quotes.
execute system command(s):
qx//
quoted words:
@array = qw/the fat cat sat on the mat/
For m, s, tr, and qr, look it up. There are entire books written on those.
|
|
|
|
|
|
|
|
|
|