That's an interesting idea.

This example dies under strict with Can't use string as a HASH ref and would "survive" with faulty magic after strict was removed.

For this not to be noticed under strict the symbolic ref has only to happen occasionally.

So yes it has an effect on runtime, but this is "only" exchanging one (fatal) bug with a weird bug in edge cases.

So what could happen is that someone thought removing strict fixed the bug in a long running script, which eventually produced broken data.

Well ... I think we agree that removing strict is not a good idea anyway.

One might only be able to make a case for short scripts and one-liners. But the longer you wait to activate strict the more expensive it gets.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery


In reply to Re^5: How to import "global" variables into sub-scripts from main script? by LanX
in thread How to import "global" variables into sub-scripts from main script? by Polyglot

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.