I was updating as you replied. The last expression evaluated is the value returned by do. If it is undef, then you can't tell it apart from the times when do returns an undef because the file doesn't compile or doesn't exist.
If that if clause is the last thing being evaluated, and the file doesn't exist, it is evaluating to undef and being returned. (And setting $! to boot.) You can probably take care of it with else { return 0 } or similar.
-sauoq
"My two cents aren't worth a dime.";
|