|P is for Practical|
In Love With Double Quotesby revence27 (Novice)
|on Aug 07, 2005 at 10:57 UTC||Need Help??|
That title was just to get you to read past the title. The truth is that, in fact, I am going to bark a very short rant against double quotes, while I wait for the Monastery GongsTM to call us for lunch. I need a decent plate of
How often do you ever stop in the middle of a hack, and ask thine self whether || ! you should use double || single quotes?
This is something you won't find in any Write-Better-Perl-Today texts. Because it's a waste of resources to talk about something that has almost no importance.
But since I'm in the comfort of The Monastery, I'll rant.
'This hot Perlistic string'
is better, IMHO, than
"This hot Perlistic string"
Because, as you can see, there are no $vars in the string, so putting it in double quotes would burden perl for nothing.
Also, I think 'First half ' . $second_half is better than "First half $second_half", for the same reason.
I think if you have lots of stringin' around to do, this would be a neater thing to do.
Punch me in the face.