in reply to Re: Single Quotes Versus Double Quotes
in thread Single Quotes Versus Double Quotes

Future maintainance work is exactly the reason I use double quotes. I find it not to be uncommon that I later want to add a variable in a string to be printed. Having to change to quotes is work I try to avoid.

And programmers that get confused when encountering double quotes, but nothing to interpolate. Well, sorry, but if that confuses you, you shouldn't be programming at all. Or at least, not in Perl.

  • Comment on Re^2: Single Quotes Versus Double Quotes

Replies are listed 'Best First'.
Re^3: Single Quotes Versus Double Quotes
by davorg (Chancellor) on Oct 13, 2006 at 11:02 UTC

    I'm not saying that it confuses me. I'm saying that I use it as a flag to myself (or whoever is editing my code). Single quotes denote a string with no variable interpolation or special escape sequences. It seems obvious and useful to me.

    And, yes, I sometimes have to change quote characters when I'm editing code. I see that as part of keeping the code as readable as possible.

    I'm glad to see that Damian Conway agrees with me (see section 4.1 of Perl Best Practices).

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg