in reply to meddling with forces I can't understand

Could it be ; $ct**2) is not doing what you think it is? The expression does not alter $ct. It may be that you intended something like $ct += 2.

Update:

I'd expect that you should get a heads up about "useless use of exponentiation (**) in void context" if you are using strictures (use strict; use warnings;). If you are not using strictures I strongly advise that you do!

You should really avoid using global variables ($writeCounter appears to be global).

If @forkarray is local there is no need to initialize it. If it's required outside the sub it should either be passed in by reference or returned to the calling code.

Code in a loop of the form:

if (...) { ... } else { last; }

is cleaner as:

last unless ...; ...

because it removes a level of nesting and makes the condition for last clearer.

An early exit before the second for loop would clean the code up in a similar fashion:

return unless fork (); for (...) { ... }

Perl is environmentally friendly - it saves trees