sub a{ my $x = 'fred'; sub b{ print $x } b(); }; a();; Variable "$x" will not stay shared at ... fred