Yeah, I was thinking somewhere along the lines of how SQL treats NULLs. Although I suppose that instinctively, I would expect undef == 0 to be false but undef == undef to be true. Not that it would be right in any way.
my $test = return_from_function();
if (not defined $test) {
# do this if evaluates to undefined
} elsif (!$test) {
# do this if evaluates to zero equivalent
} elsif ($test) {
# do this if evaluates to non-zero equivalent
}