471,886 Members | 1,113 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,886 software developers and data experts.

Modify the contents of @INC

I can't seem to figure out how to modify the contents of @INC. I want to tell perl to look in a different directory when searching for modules. Any thoughts?
Jan 12 '07 #1
3 11152
511 Expert 256MB
if you look at the online perldoc, this is what is stated
perldoc -q INC

Expand|Select|Wrap|Line Numbers
  1. How do I add a directory to my include path (@INC) at runtime?
  3.        Here are the suggested ways of modifying your include path:
  5.            the PERLLIB environment variable
  6.            the PERL5LIB environment variable
  7.            the perl ‐Idir command line flag
  8.            the use lib pragma, as in
  9.                use lib "$ENV{HOME}/myown_perllib";
  11.        The latter is particularly useful because it knows about machine dependent architectures.  The lib.pm pragmatic module was first included with the 5.002 release of Perl.
Jan 12 '07 #2
1,089 Expert 1GB
This is what you need:

Jan 12 '07 #3
Thanks that works. However now a new problem. Spent 5 hours searching google and online docs but ... you know the drill

I am running IIS6 and last week all my scripts ran fine. Something changed because out of the blue all my scripts started saying "Cant locate XXX.pm in @INC" I used the lib to fix that and now I get "The specified CGI application misbehaved by not returning a complete set of HTTP headers."

All my scripts print out "Content-type: text/html\n\n" before anything else so I thought this error was a result of installing PHP but I still get this even after I removed PHP.

Jan 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Phester | last post: by
reply views Thread by Chris McKeever | last post: by
2 posts views Thread by Dung Ping | last post: by
28 posts views Thread by Charles Sullivan | last post: by
1 post views Thread by ed_spain | last post: by
4 posts views Thread by IchBin | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.