Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: When -w and use strict aren't enough...

by Abigail-II (Bishop)
on Nov 04, 2003 at 14:21 UTC ( #304423=note: print w/replies, xml ) Need Help??


in reply to When -w and use strict aren't enough...

If you leave the parenthesis off, like this:
if ($mday == 1 && $month == 1) { handelNewYear; # Typo in function name. }
then the code won't compile under 'use strict'.

Leaving parens off isn't always possible without writing uncommon idiom, but in many cases you can leave the parens off, and it'll capture many mistyped sub names.

Abigail

Replies are listed 'Best First'.
Re: Re: When -w and use strict aren't enough...
by RMGir (Prior) on Nov 04, 2003 at 19:48 UTC
    Very cool, thanks Abigail-II.

    Exactly the kind of wisdom I was hoping for :)


    Mike

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2021-06-13 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (58 votes). Check out past polls.

    Notices?