How do I detect that a function call has returned undef? Some functions seem to return zero or another number as a valid result, and undef to indicate failure. But if I try to compare it with anything, it complains of using an uninitialised value, or something like that. Unless it's some other bug in my code ... Thanks, Richard