For engineering reasons, I use single-quotes when I mean to use a literal, and double-quotes when I mean to interpolate. It's just a matter of doing what you're saying, and saying what you're doing.

If I want to use a string constant, I use single quotes. No ambiguity. No mental gymnastics trying to figure out what '@$_$@#!!' means. It's a curse. Ok, so that doesn't come up too often. However, other interpolations, such as 'someone@somewhere.com', are quite frequent.

If I want to interpolate strings, I use double quotes. No ambiguity. It's just a simple acknowledgement that I know what I'm doing, and what I'm doing is interpolation.

People who mindlessly use only a single tool probably don't know there are other tools out there, and, moreover, probably don't really know their own tool properly. If you insisted on using double-quotes everywhere in your code while you worked for me, and in the style you present above, I'd have your attitude for supper. It's simply not conducive to either the workplace or perlmonks.


In reply to Re^2: In Love With Double Quotes by Tanktalus
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.