my $foo = 1; my $bar; {# a new scope $bar = 2; }# end of new scope my $baz = $bar;