Over in Re^2: Newline's creep in, while using Tie::File I asked what I though was simple question...
should use strict; always be used or are there circumstances when it makes sense not to use this pragma?

As is often the case, I didn't realise where this simple question would lead. Several clever Monks have shown me the wisdom of using this simple but powerful line in every script going forward. But that is going forward...

I have many, many lines of production code within lots and lots of scripts and none of them use strict; To be clear, all the code works well in that it does everything it is supposed to do consistently and within an acceptable time. Some of it is evolving, some is largely static and I do not see it being developed further.

So my question is, given that I see the value of use strict; going forward, what might I do with existing, working code. Is there any benefit to going back over working code, breaking it and having to repair it again to include this pragma?

I do have test environments so I would not have to break the code whilst it is in production!


In reply to Backdating strict by Bod

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.