Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: adding arguments to @INC Message-ID: <8693@jpl-devvax.JPL.NASA.GOV> Date: 12 Jul 90 03:58:47 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp.lang.perl Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 29 In article m1dib00@fed.frb.gov (Douglas I. Battenberg) writes: : I am trying to add a library of perl scripts to be evaluated by the : "do EXPR" command. The man pages seem to indicate that this is done : with the -I command line option so I did this to my main script: : : #! /usr/bin/perl -I/mq/home/bin/perl : : I printed @INC in my main script and got this: : : /mq/home/bin/ /usr/local/lib/perl : : : Only the first thirteen characters of the directory were included. I tried : using a directory path of less than thirteen characters but the script seems : to ignore this additional entry in @INC. It finds things in : /usr/local/lib/perl just fine. What am I missing here? That's all the kernel will pass--the allowed size of a switch is very small-- about 16 bytes. To do what you want, just modify @INC first thing in the script: #! /usr/bin/perl unshift(@INC, '/mq/home/bin/perl'); do $whatever; Should do the same thing. It won't help if you do #include with the C preprocessor though, since that happens before the script starts executing. Larry