473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Modify the contents of @INC

4
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 11294
ghostdog74
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?
  2.  
  3.        Here are the suggested ways of modifying your include path:
  4.  
  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";
  10.  
  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.
  12.  
  13.  
Jan 12 '07 #2
miller
1,089 Expert 1GB
This is what you need:

http://perldoc.perl.org/lib.html
Jan 12 '07 #3
BobVDP
4
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.

Thanks
Bob
Jan 12 '07 #4

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

Similar topics

4
by: Phester | last post by:
If a file has a .inc extension, or if it has a .inc.php extension, is it treated differently by the php interpreter? Or is it just a convention? I've been calling my included files filename.php...
0
by: Chris McKeever | last post by:
I am trying to modify the Mailman Python code to stop mapping MIME-types and use the extension of the attachment instead. I am pretty much clueless as to what I need to do here, but I think I have...
2
by: Dung Ping | last post by:
Some time ago someone on this forum helped me with the attached coding. The page is in: www.pinyinology.com/keys/keys2.html When clicking the ok, the letters will change one by one. I like...
28
by: Charles Sullivan | last post by:
I'm working on a program which has a "tree" of command line arguments, i.e., myprogram level1 ]] such that there can be more than one level2 argument for each level1 argument and more than one...
13
by: baumann.Pan | last post by:
when define char *p = " can not modify"; p ='b' ;is not allowed, but if you declare p as char p = "can modify"; p = 'b'; is ok? why?
2
by: darrel | last post by:
This is maybe a blue-sky wish, but I have to ask... Can .net access/modify the contents of an HTML tag on the page? For instance, in XML, one can grab and set the properties for a tag. In...
1
by: ed_spain | last post by:
Hi Everyone, Before I write the script myself, I'm looking for PHP code that checks that a link's content type matches it's contents. I need this for my "broken link" checker script, which fails...
4
by: IchBin | last post by:
What are the advantages or disadvantages of .inc files over the 'include' statement. I can't seem to find that information at the PHP website. Also the same for form building inline, I guess you...
6
by: goodguyjam | last post by:
Hi all, I'm having trouble with mysql. I've just finished my php coding for HTTP authentication and with some help am now getting a login window pop up whenever I click on a link on my website...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.