in reply to fork problem

sandrider,
I am not responding regarding your original question but making a comment on code style you may want to consider.
#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');
I would most likely have written that as:
my %data; $data{$_} = $cgi->param($_) for qw(type mudpit url bold_red max_hits);
You may also want to check out the Vars method if you need the entire parameter list fetched.

Cheers - L~R