use strict; my $foo = 'Outside'; $_ = 'Global'; { local($_) = 'local'; my $foo = 'inside'; shazam(); } sub shazam { print "$_ : $foo\n"; }