Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: To Single Quote or to Double Quote

by perrin (Chancellor)
on Feb 01, 2005 at 20:29 UTC ( #427038=note: print w/replies, xml ) Need Help??


in reply to To Single Quote or to Double Quote

This is a case of "say what you mean." If you mean "here is a literal string", use single quotes. If you mean "here is a string with some stuff I want you to interpolate", use double quotes. The performance difference is not enough to care about, but you should use the right one for clarity.

Replies are listed 'Best First'.
Re^2: To Single Quote or to Double Quote
by NateTut (Deacon) on Feb 01, 2005 at 20:40 UTC
    I agree. I just wonder about the performance hit on all those unnecessary "s

    Doug

      Since it is incurred at compile time, I'd venture to say that the "performance hit" wouldn't be anything to write home about.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2021-10-23 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (87 votes). Check out past polls.

    Notices?