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

As said before, the first way should work - but I really wouldn't place the waitpid inside the loop, but move that into a $SIG{CHLD} handler.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}