I actually do that, I forgot and left that line out, it is further up in the code, sorry.
I do clear the hash, the reap_child sub is called by the $SIG{CHLD}= \&reap_child signal, this sub reaps the child with 'waitpid' and removes the pid from the hash.