my $result; $result = something() or croak "Something went wrong"; return $result;