in reply to Interpolation between single quotes?

The backslash is needed as an escape character in single-quoted strings so that you can include single quotes within them. As it is used as an escape character, then it can't be used as a normal character. Therefore you need to use two of them (an escape character followed by a backslash) in order to put one within single quotes.

The single quote and the backslash are the only two characters that need to be escaped in a single quoted string.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re: Interpolation between single quotes?