RE: LABELS, forks and foreach loops.....

2003-03-27 Thread Mark Anderson
--- Original message --- foreach $hostId ( @hostIds ) { my $pid = undef; $pid = fork if $CHILD_PIDS < $MAX_CHILDREN; if( $pid > 0 ) { $CHILD_PIDS++; #Add the children up until we hit the

Re: LABELS, forks and foreach loops.....

2003-03-27 Thread Rob Dixon
Chad Kellerman wrote: > Rob, > >Thanks for the help. I did what you suggested and cleaned up the code. > But I am getting some strange errors: > > Use of uninitialized value in numeric gt (>) at ./script.pl line #. > > foreach $hostId ( @hostIds ) { > > my $pid = undef; > > $pid = fork

Re: LABELS, forks and foreach loops.....

2003-03-27 Thread chad kellerman
Rob, Thanks for the help. I did what you suggested and cleaned up the code. But I am getting some strange errors: Use of uninitialized value in numeric gt (>) at ./script.pl line #. foreach $hostId ( @hostIds ) { my $pid = undef;

Re: LABELS, forks and foreach loops.....

2003-03-27 Thread Rob Dixon
Hi Chad. Chad Kellerman wrote: > Hello, > >Got a little issue. Tyring ot under stand how things work but just not > getting it. I am forking each element of the array . I have a maximum child > count of 8. Which works. What I was wondering is if I get into the if > statement in the until