use PPM; .... # array of fully qualified path to each .ppd file for ( @modules_to_install ) { print "Attempting to install $_\n"; if( PPM::InstallPackage("package" => $_) ) { print "Successfully installed $_\n"; } else { print "Failed to install $_\n"; $errors++; } }