fork && exit; # CGI script returns/exits right then # This continues processing in the background while ($_ = shift(@things_to_do)) { sleep $seconds; process($_); }