sub foo { if (1) { my $x = 2; } print $x; # undeclared }