in reply to need advice on conditionals
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 # }
|
|---|