in reply to Re: That damn "strict"
in thread That damn "strict"

To further elaborate, I would put forward that one should turn off the specific aspect of strict you wish to violate within that specific block. Don't no strict; when you really mean no strict 'refs';.

This is very similar to when I use which quoting mechanism. I use single-quotes nearly exclusively, except when I either have to use single-quotes within that string or if I'm interpolating a variable. And, double-quotes, to me, specifically indicate that one of those two situations is occurring. (This has caused me no end of grief in Javascript because IE won't auto-create a String object from a string created with single-quotes, only one created with double-quotes.)


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^3: That damn "strict"
by tilly (Archbishop) on Sep 17, 2005 at 05:38 UTC
    I have the opposite quoting problem.

    I am in the habit of always quoting with ", so that I won't have to change it if I later decide to interpolate a variable.

    Which gives me no end of grief when it comes to SQL, because I constantly use " for strings and then wonder why it is complaining about my identifiers.

      lately started a job working with somebody who had written piles of code using qq{Look Ma! Double quoted string!} construct. it's a habit i think i may adopt, solves precisely this problem

      at one point, doing interpolation with a hash (for, perhaps, the 1000th time that day) a la:

      my %hash=(foo=>1); print qq{$hash{foo}};
      i wondered very intensely why that doesn't cause a syntax error, but then i came to my senses and stopped really caring ....

      It's not what you look like, when you're doin' what you’re doin'.
      It's what you’re doin' when you’re doin' what you look like you’re doin'!
           - Charles Wright & the Watts 103rd Street Rhythm Band
        hmmm, for me your code does cause an error
        adding a semicolon after the first line fixes this
        or am I missing the obvious?
        si_lence
        I use qq a lot as well, but mainly for whole blocks of text.