Solved

Adding to @INC without modifying existing scripts

Posted on 2004-09-29
3
175 Views
Last Modified: 2010-03-05
Hi experts,

Is there a way to add to @INC without modifying our existing scripts. This is because the directory of some of the libraries has moved to a different directory and as there are a lot of existing scripts, I would like to avoid modifying each one of them.

Would appreciate it if anyone could provide some pointers.

Cheers,
Ben
0
Comment
Question by:bcheong
3 Comments
 
LVL 12

Accepted Solution

by:
stefan73 earned 125 total points
ID: 12178155
Hi bcheong,
You can either add the new paths to the PERL5LIB environment, or you can use the -I command line switch to add your new directories to @INC.

Cheers!

Stefan
0
 
LVL 13

Expert Comment

by:gripe
ID: 12179762
You could also recompile Perl and modify @INC permanently during the compile steps. Just run the 'Configure' program and it will prompt you for additional paths to add to @INC.
0
 
LVL 3

Expert Comment

by:Felix2000
ID: 12235856
#!/usr/bin/perl
push @INC, "/var/www/cgi-bin";

replace /var/www/cgi-bin with whatever directory you need.

Hope it helps

-= Felix =-
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now