use strict; my $foo = 'bar'; &baz; sub baz { our $foo = 7; print $foo; } print $foo;