People generally predeclare with my to assist with error-checking. If you add the pragma use strict; to the top of your program, all variables have to be declared with my or our before they're used. This helps eliminate errors due to variable name typos.
For example:
will produce an error.use strict; my $typo; $tuypo = "Here's some data: $data"; print $typo;
In reply to Re: Predeclaration
by Anonymous Monk
in thread Predeclaration
by hakkr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |