Three variables were defined, one in each block. (Blocks which aren't even mutually exclusive, I might add.) A fourth variable doesn't magically become defined elsewhere as a result. I believe you want
my $var; if (...) { $var = ...; } elsif (...) { $var = ...; } else { die; }
In reply to Re^3: Stupid If Question
by ikegami
in thread Stupid If Question
by Lrdtalon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |