I only use strict and warnings in my code during development. (Academic note: Believe it or not, using strict creates overhead although it's not an optimization to write home about). I'm far from perfect. I know I can make spelling erors (<--see), not keep proper case, or just accidentally append a random string to the end of variable names due to my bashing my head against the keyboard. I may sometimes accidentally put $$array[0] instead of ${$array[0]}. Strict catches that (unless there's a $array, but I tend not to overlap variable names between list types and scalars). I consider not using strict during development to be synonymous with nailing two pieces of wood together in the dark. Sure, you can do it but the results may not be quite as pretty or as painless as they would be if you did it in a well-lit room.

...at least that's my opinion.

Updated: The reason I don't use strict in my production scripts is actually because I use a series of dev modules that set up my programming environment. These specify such nifty things as how die and warn should react as well as possibly setting up STDIN and %ENV for testing that particular script. I mentioned the overhead involved with using strict mostly as an academic interest. Why not list specifically use strict;use warnings; in my script? Because that is done from my dev module's import. I don't need the "optimization". I didn't mean to imply that I use it as an optimization. I don't comment out use strict;. use strict; is meant to help me program. So what difference does it make if it isn't present in production? When the scripts go into production, a blank dev module with only a version and a __DATA__ section with development notes is provided to give any future developers some hints as to how I created the software as well as development tests, the output, and any notes to go along with them. Sorry for the long update. I realized by the --'s on this post that I wasn't clear on what I originally meant to say.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1


In reply to Re: to strict or not to strict by antirice
in thread to strict or not to strict by castaway

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.