# file an `at` job of running contents of 'file' at 12:05 open AT, "at -f test 1205 2>&1 |" || die "can't `at`"; while() { ($job_id,$job_date,$job_time) = (/^job (\d+) at (\S+) (\S+)/); } # last one seen wins print "at job ID: $job_id\n";