my $success = my ($y) = f($x); # Returns () on error. if (!$success) { ... }