use English;
names for ugly punctuation variables
$ARG | Used by foreach, grep, map, print, unlink and
various unary functions including ord, int .pattern matching m//, s///, and tr/// when no =~ is used
Matching
|
|
$LAST_PAREN_MATCH | $+ | last bracket matched/ $n = 1 or 2 … | text last matched $LAST_SUBMATCH_RESULT | $^N | |
| $LAST_MATCH_START | $-{ARRAY} | $LAST_MATCH_END | $+{ARRAY}
| Input | Output
| $NR | $INPUT_LINE_NUMBER $. $OUTPUT_AUTOFLUSH =1; | $| =1; $RS | $INPUT_RECORD_SEPARATOR = $/ defaultes to \n
$ORS | $\
| avoids needing to add \n to print s BUT printf still needs it! | $OFS | $OUTPUT_FIELD_SEPARATOR $,
| Interpolation "constants"
| $LIST_SEPARATOR | $" $SUBSEP | $SUBSCRIPT_SEPARATOR $; Formats
| $FORMAT_PAGE_NUMBER | $% $FORMAT_LINES_PER_PAGE | $= $FORMAT_NAME | $~ $FORMAT_TOP_NAME | $^ $FORMAT_LINES_LEFT | $- |
| $FORMAT_LINE_BREAK_CHARACTERS | $: $FORMAT_FORMFEED | $^L Error status
| $CHILD_ERROR | $? |
| $ERRNO |
| %OS_ERROR | %ERRNO %! use Errno; | errorno.h if ($!{ENOENT}) {
$OS_ERROR | $!
| if (open(FH, $filename)) { # Here |
Variables with side-effects which get triggered just by accessing them (like $0 == ProgramName) will still be affected.
See
This module can provoke sizeable inefficiencies for regular expressions,
due to unfortunate implementation details. If performance matters in
your application and you don't need
$PREMATCH, $MATCH, or $POSTMATCH,
try doing