I have a dir called foo
, and in that I have lib
and bin
. The scripts in bin
need stuff in lib
. I do someth
The standard FindBin module does what you want.
use FindBin;
use lib "$FindBin::Bin/../lib";
perldoc FindBin
for more.
use lib './';
has been working for me with Perl v5.14.2 on a linux box to include files in the same directory as my script.
Perhaps it would work for you to move your lib and bin directories under your script's working directory and try to reference them using
use lib './bin/';