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

Discussion in 'Perl Misc' started by Mimi, Sep 15, 2004.

  1. Mimi

    Mimi Guest

    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
     
    Mimi, Sep 15, 2004
    #1
    1. Advertising

  2. Mimi <> 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
     
    David K. Wall, Sep 15, 2004
    #2
    1. Advertising

  3. Mimi

    Joe Smith Guest

    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
     
    Joe Smith, Sep 16, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ruby Ruby
    Replies:
    0
    Views:
    220
    Ruby Ruby
    Apr 22, 2004
  2. Nicholas Van Weerdenburg

    require of a .file

    Nicholas Van Weerdenburg, Jan 17, 2005, in forum: Ruby
    Replies:
    9
    Views:
    169
    Nicholas Van Weerdenburg
    Jan 25, 2005
  3. Zev Blut
    Replies:
    10
    Views:
    191
    Zev Blut
    Feb 23, 2005
  4. Trans
    Replies:
    4
    Views:
    114
    Trans
    Aug 12, 2006
  5. Vijoy Varghese
    Replies:
    4
    Views:
    141
    Vijoy Varghese
    Jul 11, 2005
Loading...

Share This Page