but if I needed to code similar tests in several places I would go for:if (defined $foo and $foo eq 'true') {...}
sub is_true ($) { defined $_[0] and $_[0] eq 'true' } if (is_true $foo) {...} if (is_true $bar) {...}
In reply to Re: When warnings get in the way
by salva
in thread When warnings get in the way
by Sprad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |