http://www.perlmonks.org?node_id=438967


in reply to Escaping characters in one-liners

On all platforms, you can avoid using particular quoting characters inside your program by using the generic quoting constructs q() and qq().

For instance, to single-quote something in bash:

perl -we'my $c=400; print q(not interpolated: $c)'

This is even more useful in Win32, where you need to avoid the much more common doublequotes:

perl -we"my $c=400; print qq(interpolated: $c)"

You can also delimit on something besides parentheses, but parens are easy to read and not disallowed by anything, so I rarely bother.

See perlop under q/STRING/.