fork in perl

view full story

http://www.unix.com – Hi, I have a file which has some 50 hosts, I want to login to each host using ssh and execute any command. I am using fork function in perl. I am able to login to each host and execute the command in the hosts paralelly, but it spawing/forking 50 processes at a time. It will consume the cpu utilization if so many processes open at a time. Can someone tell me how to limit the number of process. For example, open 10 processes and execute the command on 10 hosts, after completion of those 10 hosts, open next 10 processes and so on. I know that there is a perl module "Parallel::F (HowTos)