Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: In Love With Double Quotes

by davorg (Chancellor)
on Aug 08, 2005 at 08:27 UTC ( [id://481821]=note: print w/replies, xml ) Need Help??


in reply to In Love With Double Quotes

Actually, Perl knows when you've used double quotes around a fixed string and changes them to single quotes internally.

$ perl -MO=Deparse -le 'print "Fixed string"' BEGIN { $/ = "\n"; $\ = "\n"; } print 'Fixed string'; -e syntax OK $

In my opinion, a much better reason for using single quotes for fixed strings is that it tells the next programmer to look at your code that nothing interesting is going on in that string.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-20 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found