my $foo=1; # create an anonymous lexical and label it as $foo { my $foo=2; # create an new anonymous lexical and also label it $foo # this $foo will block the other $foo from being accessed # by name until we reach the end of scope print $foo,$/; } print $foo,$/; #prints 2 and 1; #--------------- our $Foo=1; # Tell Perl that its ok for us to access $Foo # without qualification, and give it 1 as a value. { our $Foo=2; # Tell Perl that its ok for us to access $Foo # without qualification, and give it 2 as a value. print $Foo,$/; } print $Foo,$/; # prints 2 and 2