Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: How to add a file to @INC path in perl

by Kc12349 (Monk)
on Aug 31, 2011 at 22:42 UTC ( #923545=note: print w/replies, xml ) Need Help??


in reply to Re: How to add a file to @INC path in perl
in thread How to add a file to @INC path in perl

I generally do much the same, but work from a relative path using the FindBin module. FindBin will give you the directory the script is running from. My additional libs are generally in a folder relative to this location as below.

use FindBin; use lib $FindBin::Bin . '/lib';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://923545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2020-12-02 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (46 votes). Check out past polls.

    Notices?