You are viewing the version of this documentation from Perl 5.005_01. View the latest version
wait

Waits for a child process to terminate and returns the pid of the deceased process, or -1 if there are no child processes. The status is returned in $?.