use strict; my $foo = "bar"; local $foo = 2; # will break. # although { local $foo = 2; # will be fine. }