Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Did you actually try running a test of what happens if you require strict and then try to do something that strict will block?

You will find that the declaration is utterly useless.

The reason is that all of the magic of strict is buried in what the import method of strict does to the parsing of your code at compile time. A simple require loads strict too late (ie at runtime) and does not call the import method.

See Re (tilly) 1: How does strict work? for a longer explanation of how exactly strict works.

Oh, and let this be a lesson. As one Alexander Pope said:

A little learning is a dangerous thing;
Drink deep, or taste not the Pierian spring:
There shallow draughts intoxicate the brain,
And drinking largely sobers us again.
But as Aldous Huxley observed:
If a little knowledge is dangerous, where is the man who has so much as to be out of danger?
Certainly I don't! Which is why before I told you that what you were doing was useless I ran the following test of knowledge I imagine I have:
perl -e 'require strict; print $foo = "Hello\n"'
And only armed with this verification did I write this post...

In reply to Re (tilly) 1: Silly Roommate Tricks by tilly
in thread Silly Roommate Tricks by wombat

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 contemplating the Monastery: (3)
As of 2024-04-26 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found