use strict; my $foo = 1; bar(); sub bar { print $foo; }