© William "Bo" Rothwell of One Course Source, Inc. 2019
William "Bo" RothwellBeginning Perl Programminghttps://doi.org/10.1007/978-1-4842-5055-6_7

7. Basic Input and Output

William “Bo” Rothwell1 
(1)
San Diego, CA, USA
 

Reading Input

There are several methods of reading input that will be discussed in the next two chapters:
  • The standard input filehandle

  • The diamond operator

  • User-created filehandles (discussed in a later chapter)

The most common method of reading input is the standard input filehandle. A filehandle is a connection between your script and a “port.” The standard input filehandle reads data from the port connected to standard input (data coming from the keyboard by default).

The user who runs the program can “redirect” the origin of standard ...

Get Beginning Perl Programming: From Novice to Professional 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.