What is happening when my() is conditional?
问题 Compare using perl -w -Mstrict : # case Alpha print $c; ... # case Bravo if (0) { my $c = 1; } print $c; ... # case Charlie my $c = 1 if 0; print $c; Alpha and Bravo both complain about the global symbol not having an explicit package name, which is to be expected. But Charlie does not give the same warning, only that the value is uninitialized, which smells a lot like: # case Delta my $c; print $c; What exactly is going on under the hood? (Even though something like this should never be