{ use warnings; my $thingy = 'thangy'; sub doit { 0 && $thingy; # Close over $thingy eval 'print "thingy is $thingy\n"'; } } doit(); # "thingy is thangy"