Try this:
use lib '/home/neteng'; # use RRDs; # do this, or the eval statement (to check success/fail) eval "require RRDs"; if( $@ ){ print "RRDs is not installed\n"; }
See also use and perlfaq8 (What's the difference between require and use? How do I keep my own module/library directory? How do I add the directory my program lives in to the module/library search path? How do I add a directory to my include path at runtime? ).
HTH
Update: For what it's worth, the module couldn't be found because (as you point out) it wasn't in @INC. First add the directory for the module to @INC with use lib, then use or require it (don't include the '.pm' when using or requiring a module, and don't include the module name in a use lib statement). Oh, and use warnings; use strict;.
In reply to Re: module problems
by bobf
in thread module problems
by zajaco0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |