Simple Input and Output
In order to make programs more useful, there has to be a way for the program to receive input and to produce output. Some programs can be very useful simply by gathering input interactively from a user. Others may need to get their information from a disk file or two. Likewise, many programs need to produce output meant for a user's eyes, while still others may need to create a disk file or modify one. In this section we explore how Perl handles files.
Keyboard Input
When a Perl program begins, there are certain names that have already been associated with standard files. These names are called file handles. One such file handle, STDIN, is associated with the keyboard. Use this file handle when you wish to read from the ...
Get Programming PERL in the .NET Environment 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.