in reply to Forking 100 processes, 5 at a time

$counter is a number. So, $$counter is something like $3, one the special variables of Perl. And those are read-only (and set by regular expressions).

Your design seems to be flawed. fork returns a process-id. Why you want to dereference that is beyond me.

Abigail