in reply to use vars - how to use this
Hi JockoHelios,
what about using our?.
Does the following below script clear somethings for you?
use strict; use warnings; { package Foo; use vars qw($bar); our $foo = 20; $bar =40; 1; } { package Bar; my $bar; $bar = 50; print $Foo::bar,$/; print $Foo::foo,$/; print $bar; 1; }
|
|---|