I usually use our in preference to use vars because it allows a declaration and assignment in one go:
our $globalvar = 10;
For global variables, I usually use our in preference to my because it doesn't create closures within subs, which can cause problems under mod_perl.
In reply to Re: OUR declaration
by sgifford
in thread OUR declaration
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |