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

M

Mimi

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
 
D

David K. Wall

Mimi said:
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
 
J

Joe Smith

Mimi said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top