So far, our application has only printed the returned results to our screen, which is standard output, or
STDOUT. Next, we will take a look at how we can log the output easily from our Perl program into a file using the shell redirect operators
>>. These operators behave in a similar fashion to how they are used in the Perl
open() function for opening a file for writing. We will also learn how to redirect
STDIN, or the standard input of another application as arguments.
Guess what? Our screen is also a file! In the directory
/dev/ in most Linux distributions, there is a file called
stdout, which we can echo strings into or even redirect a command into, and the output is returned from the file descriptor ...