A perl program can get input from, and send its output to different places,
such as files, devices, and processes.
The connection between the perl program and each such place is given a name,
called a filehandle.
Unlike variable names, filehandle names do not have any special prefix character.
It is recommended to write them in capital letters, e.g.
SOURCE_FILE, IN, OUTPUT etc.
STDIN, STDOUT, STDERR
Perl gives you some predefined filehandles:
By default, all these filehandles are associated with the terminal.
- STDIN, the program's normal input channel.
- STDOUT, the program's normal output channel.
- STDERR, an output channel for error messages.
Table of Contents.
Previous | Next.