# Start block 0 use strict; my $foo; # exists from here to the end of the file { # Start block 1 my $a; # exists from here to end of block 1 { # Start block 2 my $b; # exists from here to end of block 2 print $b; } # End block 2: $b stops existing here # print $b; # (would fail, no $b can be found) $a++; } # End block 1: $a stops existing here # print $a; # (would fail, no $a can be found) # print $b; # (would fail) print $foo; # successful # End of file $foo stops existing here.