c:\@Work\Perl\monks>perl -wMstrict -le "use strict; use warnings; use feature 'say'; ;; Foo->test('xxx'); ;; { package Foo; ;; my $variable = 'bar'; ;; BEGIN { say __PACKAGE__ . qq{::begin $vaRRRRiable}; } ;; sub test { say $_[0], $_[1], $variable; } } ;; Foo->test('yyy'); " Global symbol "$vaRRRRiable" requires explicit package name at -e line 1. BEGIN not safe after errors--compilation aborted at -e line 1.