Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?


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...

...always code in the strict mode of perl 
...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!

...always code in the strict mode of perl 

Come on!

...always code in the strict mode of perl 

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,

Always code in the strict mode of perl,


Replies are listed 'Best First'.
Re: strict
by WrongWay (Pilgrim) on Jun 13, 2001 at 23:56 UTC
    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.


Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-21 01:21 GMT
Find Nodes?
    Voting Booth?

    No recent polls found