That's why I commented that there should be a "return, exit, last, or whatever" at the end of the first block. Your version is what I should have arrived at, though.
(I was actually going for a single-if-series solution, but don't know why it didn't occur to me to check the definedness up front. I was irked by having to defined $foo and ... in all conditions before the else-block. Heh. I'm embarrassingly slow lately.)
Makeshifts last the longest.
In reply to Re^4: Checking for the existence of a passed parameter.
by Aristotle
in thread Checking for the existence of a passed parameter.
by chriso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |