Wouldn't it be enough to just do the following:
Package:
package Foo; use vars qw( $foo ); $foo = 3;
Script:
use Foo; print $Foo::foo;
It works for me. But is there something wrong with this method? Apart from the fact, that I have to explicity call $foo with the package name.
In reply to Re: Re: How to use variables from other package?
by Anonymous Monk
in thread How to use variables from other package?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |