If I create a new object in my main script (eg..$foo = new Bar), how would I allow all modules to use the variable $foo?
I have
use vars qw/$foo/;
...at the top of the main script.
I've tried local and our but I get errors with strict. Can anyone tell me how to do it?
......for example I want to be able to use $foo in Modules::Parser
@EXPORT_OK isn't what I need is it?
I've just been reading the faq's at perldoc.com but didn't find what I was looking for but I did get totally confused with all the code examples :)
I also found a certain quote funny "Did you ever notice that all young perl programmers are called Jason"
Anyway thanks.
I have
use vars qw/$foo/;
...at the top of the main script.
I've tried local and our but I get errors with strict. Can anyone tell me how to do it?
......for example I want to be able to use $foo in Modules::Parser
@EXPORT_OK isn't what I need is it?
I've just been reading the faq's at perldoc.com but didn't find what I was looking for but I did get totally confused with all the code examples :)
I also found a certain quote funny "Did you ever notice that all young perl programmers are called Jason"
Anyway thanks.