Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Interpolation in Single-quotes?

by 5mi11er (Deacon)
on May 13, 2008 at 19:33 UTC ( #686351=note: print w/ replies, xml ) Need Help??


in reply to Interpolation in Single-quotes?

Interpolation is short for "variable interpolation", and you are correct, variable interpolation is not done on single quoted strings. But there are many cases where meta-characters will need to be escaped for the string you are working with to act as you expect it to act, and this is one of those cases.

So you are correct, the backslash single quote makes the perl interpreter believe you intend for the ending single quote to be part of the string which then ends 2 lines later.

-Scott


Comment on Re: Interpolation in Single-quotes?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://686351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2015-05-29 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (593 votes), past polls