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

Re^4: Avoiding silly programming mistakes

by moritz (Cardinal)
on Aug 20, 2008 at 14:04 UTC ( #705515=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Avoiding silly programming mistakes
in thread Avoiding silly programming mistakes

If you even declare a variable, it would be nonsensical to warn when you assign to it. It's more the other way round:

if (my $x) { ... }

(variable declaration in a conditional without assignment) could actually warn, because it will never be true. (But perl intentionally doesn't have such warnings, some people like stuff like if (0) { ... }).


Comment on Re^4: Avoiding silly programming mistakes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2014-09-19 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (143 votes), past polls