Well, let's say that you change the way that a certain function does something, however slightly. For our purposes, let's say that you change a certain data structure you use, altering its name so that it is more descriptive of the new data structure. Okay, so now you've got to go to every place it was listed and make the code accept the new structure.

... and if you're anything like me, in a large listing, there always seems to be something that you forget. a simple 'use strict' can take care of that in many places. For example, it might, for our example, tell us that we used an unititilized value at line xyz. Going to xyz we realize we need to change something.

Or you may realize something that might be wrong (or that could be improved) with your current implementation.

From my (exceedingly short, I admit) experience, use strict has saved me a lot of time.

I recommend (if this didn't convince you) doing a seach with terms strict, use strict, and/or strict.pm. You'll find quite a bit of good discussion about the issue.


In reply to Re: Use Strict needed? by dimmesdale
in thread Use Strict needed? by Anonymous Monk

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.