Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If you've been following the questions/answers posted here for any length of time at all, you will have no doubt seen many examples of problems that were fixed (or could have been avoided) if the programmer had simply put "use strict;" at the beginning.

If I recall correctly, "use strict" was introduced with perl5. There were changes in the language such that older perl4 code might break. So the only time anyone should ever NOT "use strict" is if you're running perl4 code with a perl5 interpreter, and want to be in "backwards compatibility mode".

Now, seeing as how perl5 has been in wide use for over 10 years now, and seeing how many problems could be solved and/or avoided: why can't "strict" mode be made the default?!?!

Anyone who really needs backwards compatibility (or wishes to bend the rules for a very good reason) can type something to turn strict OFF (i.e., "no strict refs", etc.)

I think this would help more than it would harm.

Has anyone else ever thought this way? Agree? Disagree?


In reply to use strict by scorpio17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-24 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found