Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: To Single Quote or to Double Quote

by perrin (Chancellor)
on Feb 01, 2005 at 20:29 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-09-18 18:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (25 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.