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

Hello Monks:

I have an installation of Perl in a Sun machine, the system administrator, changed the original path : "/productos/perl5" for the next path "/usr/local/perl5". Well, i would like to change the values of the variable @INC. In which file saves perl this paths.

Thanks for all. Kind regards

Edit by tye

Replies are listed 'Best First'.
Re: INC
by Zaxo (Archbishop) on Jul 02, 2002 at 14:12 UTC

    Default @INC is compiled into Perl. You can add directories to @INC with the PERL5LIB environment variable or with use lib 'foo';

    .

    After Compline,
    Zaxo

      Pointers to the docs: use lib ... is described if you run perldoc lib (click the second link); the PERL5LIB environment variable is described in perlrun.
Re: INC
by vladb (Vicar) on Jul 02, 2002 at 14:11 UTC
    Wouldn't you simply change the environment settings to reflect the change? Otherwise, you could always add 'path' strings to the @INC array just as shown here:
    #!/usr/local/bin/perl use lib qw( /lib/path/one /lib/path/two ); # rest of the code here...


    _____________________
    # Under Construction
Re: INC
by kodo (Hermit) on Jul 02, 2002 at 14:47 UTC
    Another way would be to do:
    #!/usr/bin/perl -w BEGIN { push(@INC, '/home/giant/perl/mondules'); } use strict; use NET::Quake; ....

    giant