# assuming READ, and WRITE are the reader and writer FHs # and $pid is the pid of the process spawned close(READ); close(WRITE); waitpid $pid, 0; # or if you used FileHandle objects or autovivified scalars close($read); close($write); waitpid $pid, 0;