END { if ($pid = fork()) { wait($pid); exec(foo); } else { //finish your process off } }