How can I manage a fork pool in Perl?
问题 I'm setting something up to SSH out to several servers in 'batches'. I basically want to maintain 5 connections at a time, and when one finishes open up another (following an array of server IPs). I'm wondering for something like this should I be using fork()? If so, what logic can I use to ensure that the I maintain 5 children at a time? 回答1: Forking (or threading) is what you want, but you should look at CPAN for modules that will provide most of what you need to prevent you from