Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Answer: To express a null string, why would anyone use ...=q{} intead of ...= '' ?

( #826438=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > To express a null string, why would anyone use ...=q{} intead of ...= '' ? contributed by toolic

Damian Conway, in his book Perl Best Practices, considers it a better practice to use q{} (the single-quote operator with matching braces) instead of two single quotes because two single quotes is easily confused with a double quote for some font settings.

Comment on Answer: To express a null string, why would anyone use ...=q{} intead of ...= '' ?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2015-08-28 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (339 votes), past polls