Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > require("filex.pl") , where the file?

Reply
Thread Tools

require("filex.pl") , where the file?

 
 
Mimi
Guest
Posts: n/a
 
      09-15-2004
I'm new to Pearl. I read some asp file and see the line '
require("filex.pl")', I thought that filex should be in the same
directory, but it wasn't. How can I know where the file located, or
it point to a dll file? Try to read some documents about perl, but
noone mention it. Thanks
 
Reply With Quote
 
 
 
 
David K. Wall
Guest
Posts: n/a
 
      09-15-2004
Mimi <(E-Mail Removed)> wrote:

> I'm new to Pearl. I read some asp file and see the line '


Perl, not Pearl.

> require("filex.pl")', I thought that filex should be in the same
> directory, but it wasn't. How can I know where the file located, or
> it point to a dll file? Try to read some documents about perl, but
> noone mention it. Thanks


'require' also looks in the list of places in @INC.

See

perldoc -f require
perldoc perlvar # for info about @INC
perldoc lib # manipulating @INC

 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      09-16-2004
Mimi wrote:

> I'm new to Pearl. I read some asp file and see the line '
> require("filex.pl")', I thought that filex should be in the same
> directory, but it wasn't. How can I know where the file located


Whenever you use() or require() a file or module, the result gets
stored in the %INC hash.

% perl -le 'require "pwd.pl";for(keys %INC){print "$_=$INC{$_}\n"}'

pwd.pl=/usr/lib/perl5/5.8.3/pwd.pl

-Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments