Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 chanting in the Monastery: (7)
As of 2015-07-05 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls