There's also import_names(), which takes an argument of a namespace (anything but main:: ;) to import parameters into, so that you can say $namespace::var instead of param('var') or $cgi->param('var').
use CGI qw/import_names/; import_names('X'); print $X::hello;
Another case of TMTOWTDI. :)))
--k.
(Although you could always override CGI.pm's import_names() if you really, really, really wanted $hello, but the reasons its disabled by default are sound -- see the docs for more.)In reply to Re: (CGI::Vars) Re: Variable Variables
by Kanji
in thread Variable Variables
by marius
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |