in reply to Re: Who's who in interpackage global vars
in thread Who's who in interpackage global vars

Well, define the variable you want to share as a package variable rather than a lexical variable.

use vars qw($var); $var = 'some value'; &Package::printvar; package Package; sub printvar { print $main::var; }
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me