use strict; use warnings; sub outer { my $foo; my $inner = sub { $foo; }; $inner->(); }