wait() does not wait on subroutines, it waits on child processes to exit.
In reply to Re: Wait Question by Joost in thread Wait Question by tc1364