sub foo { local $a = 10; my $b = 20; bar(); } sub bar { print "A: $a\n"; # Just fine print "B: $b\n"; # Warning from -w }