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.
In reply to Re^5: undef==defined sometimes? (body question)
by ikegami
in thread undef==defined sometimes?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |