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