use strict and declaring vars with our is good practice. Since %GLOBAL is declared with "our", both files share the same variable. That's what our is about. No need to fully qualify %GLOBAL with the package name.use strict; our %GLOBAL; sub outputTest { print $GLOBAL{'test'}; } sub outputPOST { print $GLOBAL{'query'}->Vars; } 1;
cheers,
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Accessing CGI objects from within a 'require'-ed file?
by shmem
in thread Accessing CGI objects from within a 'require'-ed file?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |