use strict; use warnings; package B; our $foo = 3; package main; print "foo is >$foo<\n"; __END__ foo is >3<
use strict; use warnings; package B; use vars qw($foo); $foo = 3; package main; print "foo is >$foo<\n"; __END__ Global symbol "$foo" requires explicit package name at - line 10. Execution of - aborted due to compilation errors.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re^2: Variable access across packages?
by shmem
in thread Variable access across packages?
by porta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |