Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
XP is just a number
 
PerlMonks  

Re: slashes in single-quoted string

by trwww (Curate)
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 (Abbot) 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 contemplating the Monastery: (7)
As of 2014-04-21 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls