Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Use strict warnings and diagnostics or die

by mpolo (Chaplain)
on Jun 12, 2001 at 10:59 UTC ( [id://87739]=note: print w/replies, xml ) Need Help??


in reply to Use strict warnings and diagnostics or die

As commented by another, this is awfully long for a new user. (At least at one blow.) What if we split this into three tutorials (entitled "use strict;" "use warnings;" and "use diagnostics;")? Then we would be able easily link the appropriate chunk and maybe have a chance that it gets read. Of course, I have a few suggestions...

<mode value="pedantic">

In "use strict 'subs';", I suggest adding a sum-it-up line. "So, when this pragma is active, Perl will no longer assume that barewords are subroutine calls. You will need to either tack on parentheses (an argument list) or explicitly prefix the subroutine name with the & funny character." (or equivalent...)

In "use warnings;" your explanation of the shebang to Windows users needs some punctuation. I suggest putting the sentence in parentheses and adding a colon after "For Win32 users".

In the summary for that section, you say "So we have a syntax error...", but that's not true. We have a typing error -- as your warnings output indicates, the syntax was OK.

</mode>

P.S. Are you sure this isn't just an elaborate XP-gaining scheme?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://87739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found