Special Variables

Default input and pattern space (topic) @ARGV, $ARGV, ARGV

Command-line args, current file name for <>, the filehandle OS error (errno) as a string/number Error from the last eval

Status of the last system, backticks, or pipe close ($? >> 8 = exit code) Extended OS error (Windows)

$1, $2,..., $&, ` $ `, $', $+, %+, %-, @-, @+` | Regex match variables Current input line number Input / output record separators

Output field separator / list interpolation separator Subscript separator for multidimensional hash emulation Autoflush the selected filehandle Sort comparison variables OS name (linux, darwin, MSWin32)

Perl version (v-string / number like 5.040000) Path to the perl executable Program start time (epoch) Global warnings flag (-w) Taint mode status @INC, %INC Module search path, loaded modules

__FILE__, __LINE__, __PACKAGE__, __SUB__, __CLASS__ DATA, STDIN, STDOUT, STDERR

use English; gives long names ($ARG, $ERRNO, $EVAL_ERROR, $PROCESS_ID, $INPUT_RECORD_SEPARATOR).

Always localize special variables you change (local $/;, local $_;, local $|= 1;).