So lets say I have a dir called foo, and in that I have lib and bin. The scripts in bin need stuff in lib. So naturally I do something like this:
use lib '../lib';
use Foo; # <-- comes from lib
FindBin module does what you want.
use FindBin; use lib "$FindBin::Bin/../lib";
perldoc FindBin for more.