Free Files, Testing Files, and Binary Data
Files and file systems don't just contain the data that you put into files. Sometimes the filehandles represent more than a simple file. For example, filehandles can be attached to the keyboard device, network sockets, and mass-storage devices such as tape drives.
Also, file systems contain what's called metadata about your files. Perl can be used to query the file system to determine how big your file is, when it was last changed, who changed it, and information about what's in the file. With some operating systems, the file metadata can even determine whether the file is treated as a text file or a binary file.
Free Filehandles
Perl began life as a UNIX utility, and sometimes pieces of its heritage ...
Get Sams Teach Yourself Perl in 24 Hours 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.