The other solutions are implementing finding the path of script from $0. There is a module, FindBin, that does this and handles all the edges cases. It is perfect for using it with "use lib" to set @INC. You don't even need a BEGIN block.
use FindBin;
use lib "$FindBin::Bin/../lib";