CHAPTER 12Input and Output with Filehandles
In order to read or write to any kind of data source, we need a way of communicating with it. Filehandles provide that facility, acting as one end of a channel along which data can pass in one or both directions. The other end of the channel is largely abstract, so aside from the details of how we create the filehandle, one filehandle is very much like another. This abstraction allows a lot of different IO programming tasks to be condensed down into one set of concepts. Once we have a filehandle, we can read from it and write to it. If the filehandle points to an actual file or a device that supports the concept of a position, we can also use random access to read or write to different parts of it. ...
Get Pro Perl 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.