Going Deeper

Whole books have been written on using the various platform-specific bits of Perl (or for avoiding them). To keep this chapter to the minimum, I've skipped over a number of features that you might want to explore on your own when you're done with this book.

Pipes

Probably the biggest feature that was not talked about in this book is the use of pipes. A pipe is sort of a channel from which you can read data, and to which you can send data. The pipe can connect to the standard input and output of your script and some other program, or it can also connect to a device such as a printer, or a network connection such as a socket.

On Unix, you can open a pipe as if it were just another file handle, and read and write to it that way. The ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.