#doing stuff up here. my $pid; if (!defined ($pid = fork)){ DieNice("Unable to fork: $!\n"); }elsif (! $pid){ close(STDIN); close(STDOUT); close(STDERR); }else{ print header, start_html, h2('Sending Mail...'), "\t\n", end_html; #Here the user is redirected. } while (<@to>){ chomp($_); push @chunk, $_; $count ++; if ($count == 80){ #splits bcc into small chuncks $to = join ",", @chunk; mailout(); $count = 0; @chunk = (); } } #still doing more time consuming stuff...