####### ## A ## ####### use strict; my $foo; $foo = "outside"; for $foo (qw(a b c)) { print_foo(); } sub print_foo { print "$foo\n"; } __END__ ####### ## B ## ####### use strict; our $foo; $foo = "outside"; for $foo (qw(a b c)) { print_foo(); } sub print_foo { print "$foo\n"; } __END__