Perl Predefined Variables

Special
literals
Predefined
filehandles
Predefined
variables
Global
variables

Special literals:
Literal Meaning
__LINE__ current line number
__FILE__ current filename
__END__ causes everything after it to be ignored
__DATA__ similar to __END__ but opens DATA filehandle (see ch 5)

Predefined filehandles:
Filehandle Meaning
ARGV The special filehandle that iterates over command line filenames in @ARGV.
Usually written as the null filehandle <>
STDERR The special filehandle for standard error for any package.
STDIN The special filehandle for standard input for any package.
STDOUT The special filehandle for standard output for any package.
DATA The special filehandle that refers to anything following the __END__ token in the file containing the script. Or, the special filehandle for anything following the __DATA__ token in a required file, as long as you're reading data in the same package that the __DATA__ was found in..
_ The special filehandle used to cache the information from the last stat, lstat, or file test operator.

Predefined variables:
Variable Meaning
$scrwid screen width in ?