7.2 Pipes
In Perl, a filehandle can be associated with a file, a device, pipe or a socket. A pipe is essentially a Unix concept where the output of one program or process can be fed to another program or process. The idea of sockets has origin in the Unix operating system although it has been ported to many other platforms. If a program or a process on a machine wants to send or receive information from another program or process on another (or, the same) machine, the two programs or processes can create sockets on their respective machines and then communicate via the sockets. We will see how sockets work later in this chapter.