in reply to Re^4: undef==defined sometimes? (body question)
in thread undef==defined sometimes?

If I didn't explicitly return a value, wouldn't the results of whatever the last calculation be returned

return; return an empty list, just like return ();. If the function result is treated as a scalar, it will see undef.

If you omit the return entirely, then you get the result of the last expression evaluated.