Perl updating variables in forks