The general rule I follow is to use my unless there is a reason to use our (or use vars) to make package variables (A.K.A globals). There is only one reason to use globals: because you want to access them outside of their lexical scope. Reasons you'd want to do that include:
Note that using our won't let you do any of these except the first and last one.
- tye (but my friends call me "Tye")In reply to RE: RE: RE: (3) CGI.pm for CSS, tables, pet tricks (use vars vs my)
by tye
in thread (code)) CGI.pm - CSS, tables... (deprecated by node 50167)
by ybiC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |