- or download this
use strict 'vars';
...
Variable "@foo" is not imported at foo.pl line 10.
Global symbol "@foo" requires explicit package name at foo.pl line
+10.
foo.pl had compilation errors.
- or download this
use strict 'vars';
...
package main;
print "Foo: (@foo)\n";
- or download this
use strict 'vars';
...
package pkg;
print "Foo: (@foo)\n";
- or download this
use strict 'vars';
package pkg;
BEGIN { *pkg::foo = \@pkg::foo }
print "Foo: (@foo)\n";
- or download this
package pkg;
sub BEGIN {
*foo = \@foo;
}
- or download this
use strict 'vars';
...
__OUTPUT__
Foo: ()