String Literal Quoting

字符串文字意味着没有转义或插值(引用字符串终止符除外)

print 'This is a string literal\n'; # emits a literal \ and n to terminal

print 'This literal contains a \'postraphe '; # emits the ' but not its preceding \

你可以使用其他引用机制来避免冲突:

print q/This is is a literal \' <-- 2 characters /;  # prints both \ and '
print q^This is is a literal \' <-- 2 characters ^;  # also

某些选定的引用字符是平衡的

print q{ This is a literal and I contain { parens! } }; # prints inner { }