Hello! I'm faced with a problem, i have an array of 20 elements ("fruits"), my task is to start a maximum number of 5 children where each will pick one of the fruits array element and in that child sleep for a random number of seconds (between 3-10secods) the trick is that beeing limited on a 5max childs perl sould wait for any child to end and start another one but keep to max 5 chils and run until all elements of fruits array get a nice "sleep"
Can anyone help? I'm all out of ideas on this one, an no code i've tried to come up with does any job and they do not worth showing here ... :(
THANKS!