> perl -w use strict; BEGIN { *x= \$foo::y; } print $x; Variable "$x" is not imported at - line 3. __END__ Global symbol "$x" requires explicit package name at - line 3. Execution of - aborted due to compilation errors. > perl -w use strict; BEGIN { package foo; *main::x= \$foo::y; } print $x; __END__ Name "foo::y" used only once: possible typo at - line 2. Use of uninitialized value in print at - line 3.