-   Linux - General (
-   -   How is Perl's INC set? (

cmnorton 07-17-2008 12:24 PM

How is Perl's INC set?
I have two Linux systems. One the RH 9 system, INC points to

On my Kubuntu system, INC points to

What initially sets INC?

What technique is preferred to modify it?

Su-Shee 07-17-2008 01:04 PM

Either perl itself during compilation or the package maintainer of your distribution who is setting it elsewhere.

You can put Perl stuff anywhere you want and add any directory to @INC, but you can't add "." while using the taint mode.

You can add the directory to PERL5LIB or
you can add use lib 'directory'; to your perl script or
you can push your directory onto @INC in a BEGIN block like

BEGIN { push @INC,"/home/you/yourperlstuff/";}

(Really depends on your personal preferences and what else do you want to do..

cmnorton 07-17-2008 01:21 PM

This was a big help. Thanks.

karthik3152 06-06-2011 02:30 PM

PER5LIB usuage
you can use PERL5LIB or try to insert the line "use lib path"

For usage you can use the link
EDIT: Link removed

All times are GMT -5. The time now is 01:00 PM.