I wrote a quick script using Parallel::ForkManager that forks a maximum of 10 processes. Each child process gets data from a specific device. I have over 10 devices and so it only forks for the first 10 and ignores the rest of the devices (the for loop continues to loop but no more is forked because max is reached). The forking is done inside a foreach loop that gets the device name and connection info from a hash. I am going to rewrite the whole thing since im not using forking efficiently, however, I am curious and want to know if there is a way in perl to wait for a number of processes to finish inside the for loop before forking more.