Actually the sample does not check on define, but on truth
For the $! case, do says
warn "couldn't do $file: $!" unless defined $return;
The truth case is checking the success of the contained code, not the OS's ability to locate and execute file. I personally would go code diving before weighing in on the appropriateness of perl's behavior.
In reply to Re^5: Why do we need a \n with do FILENAME?
by kennethk
in thread Why do we need a \n with do FILENAME?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |