Solved

Adding to @INC without modifying existing scripts

Posted on 2004-09-29
3
180 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…

829 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