in reply to (zdog) RE: CGI.pm for CSS, tables, pet tricks
in thread (code)) CGI.pm - CSS, tables... (deprecated by node 50167)
use vars and my create variables in two completely different ways. use vars will create package variables which live in the *main:: typeglob. my creates a completely separate set of lexical variables that just happen to have the same names.
Having created the package variables, you then 'mask' them by declaring the lexical variables. The only way to accessthem would be to use the fully qualified variable name (like $main::type, etc.)
In summary, you don't need both sets of declarations and, in fact, you're declaring one set of variables that you never use.
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: (3) CGI.pm for CSS, tables, pet tricks (use vars vs my)
by ybiC (Prior) on Aug 14, 2000 at 19:27 UTC | |
by davorg (Chancellor) on Aug 14, 2000 at 19:31 UTC | |
by tye (Sage) on Aug 14, 2000 at 19:52 UTC |