You are wrong. Complete, and utterly wrong. It's better to use "This hot Perlistic string" then 'This hot Perlistic string'.

Your argument that perl needs to do more work is a non-argument. If that difference is important to you you ought to be programming in C directly, as using perl makes C do more work than when you programmed in C directly.

But for engineering reasons, it's better to use double quotes in a string that doesn't contain dollar (or at) signs or backslashes. The only case where the kind of quotes you use matters is if you need to change them. When would you need to change the quotes of "This hot Perlistic string" to single quotes? When you change it to something like 'This hot Perlistic string costs $100' - although you could still write "This hot Perlistic string costs \$100". But when would you need to change 'This hot Perlistic string'? For instance, if you change it into "This hot Perlistic string\n", or "This hot Perlistic $noun". And then there isn't a single keystroke alternative available that leaves in the single quotes. The latter kind changes are far more common than the former kind. Hence, it's better to use double quotes than single quotes - programmer time is more important than CPU time. (If CPU time was more important, you should have written it in C anyway). Oh, and anyone complaining he gets confused when seeing a double quoted string that doesn't have a variable inside it ought to be fired.


In reply to Re: In Love With Double Quotes by Anonymous Monk
in thread In Love With Double Quotes by revence27

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.