Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: best way to learn use strict

by Aristotle (Chancellor)
on Jul 21, 2003 at 22:44 UTC ( [id://276533] : note . print w/replies, xml ) Need Help??


in reply to Re: Re: best way to learn use strict
in thread best way to learn use strict

use strict, doesn't catch undefined variables in subroutines, that has the same name as variables outside, that has been declared, this causes hard to find bugs.

You don't want this. It is the entire point of strictures to be able to safely use a variable name without knowing whether it has been used before and not make code break.

If you want the opposite, then you're using quasi-globals. Instead, define variables in the smallest possible scope, so that they're not visible from anywhere other than where they get used.

Makeshifts last the longest.