Take a look at this. See those guys? If you don't use strict (they are lax on warnings), they will hunt you down and say mean things to you.

Seriously, the _best_ reason i can think of is 'it will save you time and keep you from stressing out'.

I had recently found myself getting very lax at using strict and warnings, and it was showing! The average programmer makes typos, lots of them. Strict and warnings will help you catch those typos, don't use them and you will waste your time trying to understand why your program is not working correctly, even though it compiles.

So, if you are really good at 'guessing' why your program is broken, then don't bother with strict and warnings, but if you cherish the hairs on your head and a calm stomach, please use them. :)

perl -le '$x="jeff";$x++ for(0..4482550);print $x'


In reply to (jeffa) Re: Why use strict/warnings? by jeffa
in thread Why use strict/warnings? by Mr.T

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.