in reply to (CGI::Vars) Re: Variable Variables
in thread Variable Variables

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.)