use warnings; use strict; my $y = "X" if 0; sub x{ print $y ? 'Okay' : 'bad'; } x(); print "$y\n";