use File::Basename; ($exename, $exepath) = fileparse(PerlSvc::Exe()); Config::Simple->import_from("${exepath}foo.conf");