B.pmuse B; $aValue = 10; my $B = new B; my $something = $B->aSub;
package B; sub new { my $class = shift; my $self = bless {}, $class; return $self; } sub aSub { my $self->shift; #here I want to access A.pl's $aValue whitout having it passed as +parameter into the $B->aSub call... } 1;
In reply to Variable access across packages? by porta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |