Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm running a Perl script, it gives me this error: "Can't locate www.pl in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib /perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .)" Also, if i see within my script it says require "www.pl"; require "wwwurl.pl"; Any help is appreciated.

Thanks, John.

Replies are listed 'Best First'.
Re: Can't locate www.pl
by dmlond (Acolyte) on Dec 02, 2010 at 16:39 UTC

    These are not standard perl modules, such as what you would find on CPAN. This script appears to be expecting perl scripts that were written by the author of the script. It is very likely that the directory which contained them on the original authors server were in a non-standard location, which can be added to the PERL5LIB environment variable. I would consult the original author of the script for more information.

Re: Can't locate www.pl
by Utilitarian (Vicar) on Dec 02, 2010 at 17:22 UTC
    Hi John,

    The person who supplied you with the script should also have supplied you with the libraries it uses (in theis case www.pl and wwwurl.pl). These libraries have to be in the include path @INC so either push their location into @INC or copy them into one of the folders listed in @INC eg /usr/local/lib/perl5/5.8.8 before attempting to require the libraries.

    push @INC "/location/of/libraries"; require "www.pl"; rewuire "wwwurl.pl"

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re: Can't locate www.pl
by Corion (Patriarch) on Dec 02, 2010 at 15:57 UTC

    Most likely, Perl is correct. You will need to find www.pl and wwwurl.pl and copy them to a location where Perl looks, so it finds these files.

    These files most likely came with your script.

      I tried finding these packages on internet but could not find it. The reason i posted is someone can redirect me a link, so i could download and install it. John.
Re: Can't locate www.pl
by Your Mother (Archbishop) on Dec 02, 2010 at 18:12 UTC

    I would also recommend extreme caution when using what appears to be 16 year old web code. Security concerns were often completely ignored and some modern ones (like Ajax/XHR stuff) didn't even exist at the time. And even barring such problems, getting help with ancient code will be much harder.

    If you ask for recommendations about a modern library or set of modules to do a specific task, someone here might be able to help you pick something more suitable.

Re: Can't locate www.pl
by locked_user sundialsvc4 (Abbot) on Dec 02, 2010 at 18:37 UTC

    I would echo the notion that you might be in for some serious grief by using very-old web code, since so very much has changed over time.

    perldoc perlrun has some information about just how Perl determines where to look for modules; that is to say, exactly what determines the contents of @INC.

Re: Can't locate www.pl
by sweetblood (Prior) on Dec 02, 2010 at 15:46 UTC
    Gee, it sounds like you guys really need a perl programmer!

    Sweetblood