Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

strict

by marcink (Monk)
on Jun 11, 2001 at 03:51 UTC ( [id://87375]=poem: print w/replies, xml ) Need Help??

Okay, I've been around for three days and already saw quite a number of questions that could be answered with 'use strict;' and 'add -w to your command line'. In fact, most of those wisdom seekers could solve their problems just by reading FAQs -- turns out that there are monks who don't read TFMs. How surprising ;-)

Anyway, perhaps something like this could help some new perl users. I apologize for the quality -- me be jussa foreigner ;-)

Do I really have to tell you what tune to sing this filk to?

Cheer up, brother, 
You know what they say.
Some things you code are bad,
They can really make you mad,
Other things just make you swear and curse,
When you're coding into morning,
Don't grumble, turn on warnings!
And this'll help things turn out for the best...
And...

...always code in the strict mode of perl 
   (whistle)
...always code in the strict mode of perl 

If Perl seems to be broken,
There's something you've forgotten!
And that might be quite hard to find indeed,
When you're feeling in the dumps,
Don't be silly chumps,
Just add two lines when coding -- that's the thing!
And...

...always code in the strict mode of perl 
   (whistle)

Come on!

...always code in the strict mode of perl 
   (whistle)

Perl can act quite absurd,
But has the final word,
No sense saying that you're right when it says no.

Just let it do its job -- use strict and 'w' flag,
And sit back -- it's the easiest way we know!

So... always code in the strict mode of perl,
It's the first advice you will ever get,

Perl finds typos quick,
And is quite good at it,
Just let it know that you want it to.

You'll see it really worked,
Just try it and you're hooked.
Just remember that the time it saves is yours!

And  always code in the strict mode of perl,
     (whistle)

Always code in the strict mode of perl,
     (whistle)



-mk

Replies are listed 'Best First'.
Re: strict
by WrongWay (Pilgrim) on Jun 13, 2001 at 23:56 UTC
    Nice....
    I never really used strict or -w , etc until I discovered the Perl monks. It always seemed to BREAK my code. :)
    Now I see with just a few minor modifications, I can be programming correctly, and not the WrongWay. Strict and -w never really broke my code. It was already broken. It just showed me excatly what I was doing wrong, and usually how to correct it.

    WrongWay

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-24 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found