I\'m new to Perl. I get the following error when I run a script:
Can\'t locate URI.pm in @INC (@INC contains: /usr/local/packages/perl_remote/5.6.1/lib/5.6.1/i86pc
Possibly you do not have URI installed. It might not be saved anywhere on your machine, or it might be "installed" in a location.
If you have to install it from CPAN, you likely need administrator privileges to put it in the listed directories. But CPAN will allow you to install it to a user directory, so you can still install it.
So if you can't install the module in the directories listed in @INC, then there are the various ways.
Perl 5 reads a environment variable called PERL5LIB. Any directory in that "array" will be prepended to @INC. So anything in the directory structure of $ENV{PERL5LIB} will be preferred to any system directory. (see here)
Another way you can do this is per script. The use lib pragma also inserts specified directories into @INC. (see lib)
use lib '/path/to/URI/module';
use URI;
The final way, you can do it per run. You can run perl with the -I switch on the command line perl -I/path/to/URI/module -e 1 (see perlrun)