{ my $subref; { my $foo = Foo->new; $subref = sub { # outer print "FOO: $foo\n"; }; } print "Outside!\n"; $subref->(); }