Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-17-2008, 01:24 PM   #1
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
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?
Old 07-17-2008, 02:04 PM   #2
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
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..
Old 07-17-2008, 02:21 PM   #3
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35

This was a big help. Thanks.
Old 06-06-2011, 03:30 PM   #4
LQ Newbie
Registered: May 2011
Posts: 10
Blog Entries: 3

Rep: Reputation: Disabled
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

Last edited by onebuck; 06-07-2011 at 10:57 PM. Reason: removed spam link


inc, perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Using Perl's Net::SMTP module LXer Syndicated Linux News 0 03-10-2008 10:40 AM
question about perl's exec danfou Programming 1 11-05-2006 11:57 PM
Perl's LWP to Python?? chutsu Programming 3 06-05-2006 01:55 PM
perl's chomp under Win-Linux thelonius Programming 3 04-12-2006 03:13 PM
perl's system() command paul_mat Linux - Software 3 11-21-2005 02:37 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration