if ($_[1] == 1) { die "something went wrong!\n" unless (defined $_[2] and defined $_[0]); # ... }