in reply to Re: Modules on a Unix server
in thread Modules on a Unix server

Please advise what I am doing wrong. I was given an area where we store our modules and it still has problems.
use lib '/export/home/jones/perl/lib/perl5/site_perl/LWP/Simple.pm';


Output message from my vir.pl script:
vir.pl[6]: use: not found vir.pl[8]: =: not found vir.pl[13]: syntax error at line 13 : `(' unexpected


My script does work on my NT but this module problem on Unix is another issue. Please advise if I am using the lib correctly?

Replies are listed 'Best First'.
Re: Re: Re: Modules on a Unix server
by seattlejohn (Deacon) on May 14, 2002 at 22:53 UTC
    From the output you supplied, it sounds as if the initial shebang line is not correctly executing the Perl interpreter in the first place. Are you sure that line is correct in your script? You might try a really simple test program to see:

    #!/path/to/perl print "Hello, world";

    If you've got the shebang right, this should just output Hello, world when you execute it.

    As for use lib, what you probably really want to do is this:

    use lib '/export/home/jones/perl/lib/perl5/site_perl/'; use LWP::Simple;

    The first line basically says "when I write use Something, make sure you look in /export/home/jones/perl/lib/perl5/site_perl/ to find Something.pm."

    The second line actually uses the LWP::Simple module (appending lwp/Simple.pm to the path specified by use lib).

      Thanks seattlejohn for helping me. I am now up and working with this module. Thanks again!!