in reply to Forking 100 processes, 5 at a time

Update: eat lunch, particle. Abigail-II is right. it's trying to interpret the value of $counter as a variable name-- and it's a perl-special constant var. things like this are often not what you mean, and are caught by use strict 'refs';
---

it's a syntax error, i assume you mean $counter and not $$counter. you're dereferencing the scalar, which is giving you it's memory location. you can't assign to that, because it's a constant. you'll have to fix lines 178 and 184 as well.

i must say, this code doesn't look right. i'd use Parallel::ForkManager for this application -- it's a well-oiled wheel.

~Particle *accelerates*

Replies are listed 'Best First'.
Re: Re: Forking 100 processes, 5 at a time
by nagan (Initiate) on Jun 14, 2002 at 20:49 UTC
    I didn't think of it as "dereferencing" (although Lord knows why I didn't...), I was thinking of variable substitution. Bu now I see what's going on - many thanks!