I think you haven't seen the code properly...processes are forked inside a subroutine called parallel_search and it has to return a hash reference.
I have tried to use run_on_finish to do the rest what is does in wait_all_children. But It doesn't work..