in reply to Fork and WWW::Mechanize: Can agent be shared?

You'll probably find Parallel::ForkManager useful.
use Parallel::ForkManager qw( ); use constant MAX_CHILDREN => 3; { my $mech = WWW::Mechanize->new(timeout => 90); my @urllist = ...; my $pm = Parallel::ForkManager->new(MAX_CHILDREN); foreach my $url (@urllist) { # Forks and returns the pid for the child. my $pid = $pm->start() and next; $mech->get($url); print $mech->content()->as_HTML(); # Exit child. $pm->finish(); } }