What you probably want to do is set up a signal handler for $SIG{CHLD} which uses wait() to clean up the child. Since it's in the CHLD signal handler, it will only get called when a process has already finished, and so it won't really have to wait.
Here's some sample code: