} elsif ($url = $cgi->param('url')) { $session = get_session_id(); $cache = get_cache_handle(); $cache->set($session, [0, ""]); #getting the parameters from the cgi object $type = $cgi->param('type'); $mudpit = $cgi->param('mudpit'); $url = $cgi->param('url'); $boldRed = $cgi->param('bold_red'); $maxHits = $cgi->param('max_hits'); if ($pid = fork) { $cgi->delete_all(); $cgi->param('session', $session); print $cgi->redirect($cgi->self_url()); } elsif (defined $pid) { close STDOUT; ($tmpDir, $resDir) = chk_dir($path); $buf = ""; @urlList = split /\n/, $url; foreach (@urlList) { ($link, $fn) = which_svr($_); dl_file($link, $fn, $tmpDir); $buf .= "$fn\n"; $cache->set($session, [0, $buf]); } #$cache->set($session, [1, $buf]); exit; } else { die "Cannot fork: $!"; }