if(open(my_perl,"|perl_file.pl $variable1 $variable2")) { #do some thing } else { #report the error or/and Log the Error in Error log }