in reply to Re^6: Unusual variable declaration
in thread Unusual variable declaration
package Foo; $Foo::y = 42; sub foo { my $x; our $y; ... } sub bar { my $x; our $y; ... }
Each of the two my $x declares a new variable. Both the our $y instruct the compiler to allow you to temporarily use a short name for the same global variable. They do NOT declare a variable!
Jenda
1984 was supposed to be a warning,
not a manual!
In Section
Seekers of Perl Wisdom