For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > July 2006 > Adding a .pl to @INC









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Adding a .pl to @INC
AC

2006-07-05, 3:56 am

Hi

I am a newcomer to Perl, am trying to run a Perl file which calls a function from
another Perl file. But while running it is complaining that it cannot find that file in @INC.
Can somebody help me as to how I should other file to @INC.

Regards
AC.
Gunnar Hjalmarsson

2006-07-05, 3:56 am

AC wrote:
> I am a newcomer to Perl, am trying to run a Perl file which calls a
> function from
> another Perl file. But while running it is complaining that it cannot
> find that file in @INC.
> Can somebody help me as to how I should other file to @INC.


That's a FAQ.

perldoc -q @INC

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Bart Lateur

2006-07-05, 6:56 pm

AC wrote:

>I am a newcomer to Perl, am trying to run a Perl file which calls a function from
>another Perl file. But while running it is complaining that it cannot find that file in @INC.
>Can somebody help me as to how I should other file to @INC.


use lib '/path/to/where/that/other/file/is';

See

http://perldoc.perl.org/lib.html

--
Bart.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com