Re: How to add a dir to @INC

2007-03-21 Thread Randal L. Schwartz
> ""kilaru" == "kilaru rajeev" <[EMAIL PROTECTED]> writes: "kilaru> Can anybody help me to add a directory to @INC variable? Since that's one of the many things that is answered in the FAQ, I will repeat what I say from time to time... if you're on this list, you should read "perldoc perlfaq

Re: How to add a dir to @INC

2007-03-21 Thread Rob Dixon
Beginner wrote: On 21 Mar 2007 at 0:00, Jeff Pang wrote: 1) use lib '/path/to/somedir'; 2) unshift @INC, '/path/to/somedir'; This can't work when you add a path to @INC on runtime. BEGIN { unshift @INC,'/path/...'; } Do you mean you have to put it in a BEGIN block to work? Yes.

Re: How to add a dir to @INC

2007-03-21 Thread Beginner
On 21 Mar 2007 at 0:00, Jeff Pang wrote: > > > > >1) > >use lib '/path/to/somedir'; > > > >2) unshift @INC, '/path/to/somedir'; > > > > This can't work when you add a path to @INC on runtime. > > BEGIN { > unshift @INC,'/path/...'; > } Do you mean you have to put it in a BEGIN block to wo

Re: How to add a dir to @INC

2007-03-21 Thread kilaru rajeev
Thank you for your help, Rajeev Kilaru On 3/21/07, Rob Dixon <[EMAIL PROTECTED]> wrote: kilaru rajeev wrote: > > Hi, > > Can anybody help me to add a directory to @INC variable? use lib '/my/dir'; Take a look at perldoc lib HTH, Rob

Re: How to add a dir to @INC

2007-03-21 Thread Rob Dixon
kilaru rajeev wrote: Hi, Can anybody help me to add a directory to @INC variable? use lib '/my/dir'; Take a look at perldoc lib HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to add a dir to @INC

2007-03-21 Thread Beginner
On 21 Mar 2007 at 17:05, kilaru rajeev wrote: > Hi, > > Can anybody help me to add a directory to @INC variable? > > Thanks, > Rajeev Kilaru > Either of these should work. Put them at the top, before you use something from somedir. 1) use lib '/path/to/somedir'; 2) unshift @INC, '/path/to/

How to add a dir to @INC

2007-03-21 Thread kilaru rajeev
Hi, Can anybody help me to add a directory to @INC variable? Thanks, Rajeev Kilaru