The STD Handles

Perl makes use of what are known as the standard file handles: STDIN, STDOUT, and STDERR. Perl opens them automatically when a script starts. At this time, for example, unless otherwise specified, all output from a print command is being automatically routed to STDOUT, or the standard output device. In such context, the following commands are the same:

print "Hello.\n"; 
print STDOUT "Hello.\n"; 

If you do not specify a file handle to print to, STDOUT will be used. STDOUT is a special file handle that, by default, sends data to the standard output device—typically, the screen. The STDIN (standard input device) defaults to the keyboard, and STDERR (standard error device) defaults to the screen, just like STDOUT.

Perl is very good ...

Get Win32 Perl Programming: The Standard Extensions, Second Edition 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.