if (my $result = some_func()) { # do something with $result }