#Note that this has to come before you include # the modules that are located in the script directory use File::Spec; use File::Basename; use lib &dirname(File::Spec->rel2abs($0));