http://www.perlmonks.org?node_id=881495


in reply to Can't find module

I thought in the process of searching for a module one of the first locations the Perl interpreter looked was the directory the currently running script resided in as well? Thanks for the reply. Whats the easiest way to check the "current directory"? Cwd? Execute statement?

Replies are listed 'Best First'.
Re^2: Can't find module
by Corion (Patriarch) on Jan 10, 2011 at 16:12 UTC
Re^2: Can't find module
by ikegami (Patriarch) on Jan 10, 2011 at 16:31 UTC

    I thought in the process of searching for a module one of the first locations the Perl interpreter looked was the directory the currently running script resided in as well?

    No, Perl searches the directories in @INC. This often includes the current work directory ("."), but it rarely includes the directory in which the script resides unless it happens to reside in the current work directory.