It looks like you might be testing argument validity. If so consider die or Carp and catching the error upstream with an eval:
if ($action eq 'new') { croak "\$name is not defined/set for action == new" unless (defined $name and $name ne ""); # # code to create new # }
In reply to Re: need advice on conditionals
by Fendaria
in thread need advice on conditionals
by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |