--- Silvio Luis Leite Santana <[EMAIL PROTECTED]> wrote:

> Since double quotes need to be searched for variable interpolation,
> while single quotes don't, I should always (whenever possible) prefer
> single quotes instead of double quotes in my programs, because:
> 
> print 'hi all';
> 
> would be faster than
> 
> print "hi all";
> 
> Am I correct?

Probably not, though I do this myself, lol...
Perl will see that there're no variables to interpolate in the string
at compile time, and the optimizer will likely make a literal out of it
exactly as if you had used single-ticks. I'd say that applies to
interpolated constants like \n as well, though I'll wait for more
knowledgeable minds to confirm or deny that.

So in short, I doubt it really matters at all.

=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than 
you are. -- me. =o) 
=============================================================
"There are trivial truths and there are great Truths.
 The opposite of a trival truth is obviously false.
 The opposite of a great Truth is also true."  -- Neils Bohr

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to