$job = "/usr/bin/qsub pbs_job.sh"; $status = system($job); #it submits the job here and #exits perl code If ($status == 0) { do something }