use Cwd qw( realpath ); use File::Basename qw( dirname ); use lib dirname(realpath($0));