$ perl -Mstrict -e'if (my $x = 0) {} print $x,$/' Global symbol "$x" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors. $ #### $ perl -Mstrict -e'if (my $x = 0) {} elsif (1) { print $x,$/}' 0 $ #### $ perl -Mstrict -e'if ($\) {print $x,$/} elsif (my $x = 0) {} else { print $x,$/}' Global symbol "$x" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors. $ #### $ perl -Mstrict -e'if ($\) {} elsif (my $x = 0) {} else { print $x,$/}' 0 $