# add a "lib" that is in the script's dir use File::Spec::Functions qw/catdir/; use lib catdir($FindBin::RealBin, 'lib'); # add a "lib" that is in the script's parent dir use Path::Class qw/dir/; use lib dir($FindBin::RealBin)->parent->subdir('lib')->stringify;