G'day HJO,
"Yes, but it is commonly considered bad practice. You can easily access global variables of the main program: $main::foo gives access to $foo in the main program"
I tried this and obviously it didn't work, ...
I don't see how this ties in with your question but what you claim obviously doesn't work, clearly does:
$ perl -le '$foo = "whatever"; print $main::foo;' whatever
-- Ken
In reply to Re: Can I from within a module access variables from the calling program?
by kcott
in thread Can I from within a module access variables from the calling program?
by HJO
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |