use strict; use warnings; my $x; { no warnings; # no warnings 'uninitialized'; print "$x"; warn "inside"; } print "$x"; warn "outside"; #### inside at d:/Users/lanx/pm/no_warn.pl line 9. Use of uninitialized value $x in string at d:/Users/lanx/pm/no_warn.pl line 11. outside at d:/Users/lanx/pm/no_warn.pl line 12.