Perl wait Function
This function Waits for a child process to terminate, returning the process ID of the deceased process. The exit status of the process is contained in $?.
Following is the simple syntax for this function:
This function returns -1 if there are no child processes else the Process ID of deceased process
Following is the example code showing its basic usage:
When above code is executed, it produced following result