Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing the @INC to include the path

Status
Not open for further replies.

dipti1

Programmer
Jul 25, 2006
9
US
Hi there,

I want to change the @INC to include the path in my home directory where I have installed Array::Compare module ? Can anybody suggest me the way to modify the @INC variable to include the path ?

Thanks!
 
I think this is what you are looking for..

unshift @INC,"$ENV{HOME}/path/to/home/";
 
if you place your module in the same location as the running script you should use this...
Code:
# Set path to user modules
use FindBin qw($Bin);
use lib "$Bin";
it makes your script much more portable!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top