{ package DEBUG; our $var = 'foo'; } { package main; BEGIN { *var = \$DEBUG::var }; print "Var is $var\n"; } $ perl debug_begin.pl Variable "$var" is not imported at debug_begin.pl line 14. Global symbol "$var" requires explicit package name at debug_begin.pl line 14. Execution of debug_begin.pl aborted due to compilation errors. $ perl -v This is perl, v5.8.9 built for x86_64-linux