in reply to global vars
But if you really want to execute the variable declarations into existance you can use the Exporter module to help. See the documentation for that module, as well as our, and perlmod. This response has already been offered by others in this thread.
I just wanted to add that you can use the fully qualified variable name even without Exporter.pm, and it won't break strictures. For example, if you have a variable in package "Variables", and the var is named "$hello", you could access it from package main like this: print $Variables::hello, "\n";
Modules give namespace segregation, but you're still able to get at that namespace from the outside.
Dave
|
|---|