use FindBin; use File::Spec; use lib File::Spec->catdir($FindBin::Bin, 'lib'); # get modules from the lib subdirectory under this perl script #... my $exe = File::Spec->catfile($FindBin::Bin, File::Spec->updir(), qw(PDFtoHTML pdftohtml)); system($exe, $pdffile) == 0 or do { # handle system error. }