O'Reilly logo

Win32 Perl Programming: The Standard Extensions, Second Edition by Dave Roth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required