[EMAIL PROTECTED] wrote:
> OK, I added the return line to sub. But I'm getting an error on the
> line require "mycommon.pl" of the tst.pl file. It say something about
> @INC cannot find mycommon.pl
You have two choices:
1. Your required file must be in @INC, i.e. in the path where perl.exe
looks for modules and libraries. @INC includes current working directory
(NOT the directory in which your tst.pl resides, but the one where you
call tst.pl from), plus /path/to/perl/lib and /path/to/perl/site/lib.
Well, usually.
If you want to know for sure what does your @INC include:
prompt> perl -e "print qq(@INC)"
2. You should specify full path to your library:
require "/path/to/mycommon.pl"
HTH
P.S. that said, i suggest you learn something about modules and use them
instead of libraries
perldoc perlmod
perldoc perlmodlib
--
Zanardi2k3
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]