in reply to Return and .pm

Don't mix "return status" of a program and "return value" of a function. In C you can perhaps confuse them, because main() return()s the program's exit code.

That's different in Perl: return() returns a value from a subroutine. exit() returns a value(better "status" or "exit code") from a program.

$? contains the last "exit code" from a child of the current program. $? is set after qx//,system, (...). It has nothing to do with modules, for the loading of modules doesn't invoke a new process, it happens in the perl process your program runs in.

As lready mentioned, `perldoc perlsub` should be read, also perlmod, as well as `perldoc -f return` and `perldoc -f exit`.

--
http://fruiture.de