Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: slashes in single-quoted string

by trwww (Priest)
on Apr 29, 2011 at 21:34 UTC ( #902080=note: print w/ replies, xml ) Need Help??


in reply to slashes in single-quoted string

For me, its enough to have a personal rule that if a string contains ' (or " when I'm interpolating), I then use the q and qq operators. This way I never have to escape a character in a string.


Comment on Re: slashes in single-quoted string
Re^2: slashes in single-quoted string
by LanX (Canon) on Apr 29, 2011 at 21:49 UTC
    > This way I never have to escape a character in a string.

    DB<100> print q{\n} \n DB<101> print q{\\n} \n DB<102> print q{\\\n} \\n

    Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-09-17 00:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (55 votes), past polls