perl -wE' sub foo { my $bar; BEGIN { $bar = 23; } }' Variable "$bar" will not stay shared at -e line 7.