Skip to Main Content
Perl in a Nutshell
book

Perl in a Nutshell

by Nathan Patwardhan, Ellen Siever, Stephen Spainhour
December 1998
Beginner to intermediate content levelBeginner to intermediate
674 pages
40h 41m
English
O'Reilly Media, Inc.
Content preview from Perl in a Nutshell

English

Provides aliases for the Perl built-in special variables. Everything else about the variables and their use remains the same. Be aware, though, that using the English module significantly slows down a program for regular expressions.

Some of the Perl variables match some awk built-in variables. For those cases, you’ll find two English names: a short version (which is the awk name) and a longer version. For example, you can use either $ERRNO (the awk name) or $OS_ERROR to refer to the Perl variable $!.

Here is the list of variables, and their English alternatives:

PerlEnglishPerlEnglish
@_ @ARG $? $CHILD_ERROR
$_ $ARG $! $OS_ERROR
$% $MATCH $! $ERRNO
$` $PREMATCH $@ $EVAL_ERROR
$' $POSTMATCH $$ $PROCESS_ID
$+ $LAST_PAREN_MATCH $$ $PID
$. $INPUT_LINE_NUMBER $< $REAL_USER_ID
$. $NR $< $UID
$/ $INPUT_RECORD_SEPARATOR $> $EFFECTIVE_USER_ID
$/ $RS $> $EUID
$| $OUTPUT_AUTOFLUSH $( $REAL_GROUP_ID
$, $OUTPUT_FIELD_SEPARATOR $( $GID
$, $OFS $) $EFFECTIVE_GROUP_ID
$\ $OUTPUT_RECORD_SEPARATOR $) $EGID
$\ $ORS $0 $PROGRAM_NAME
$" $LIST_SEPARATOR $] $PERL_VERSION
$; $SUBSCRIPT_SEPARATOR $^A $ACCUMULATOR
$; $SUBSEP $^D $DEBUGGING
$% $FORMAT_PAGE_NUMBER $^F $SYSTEM_FD_MAX
$= $FORMAT_LINES_PER_PAGE $^I $INPLACE_EDIT
$- $FORMAT_LINES_LEFT $^P $PERLDB
$~ $FORMAT_NAME $^T $BASETIME
$^ $FORMAT_TOP_NAME $^W $WARNING
$: $FORMAT_LINE_BREAK_CHARACTERS $^X $EXECUTABLE_NAME
$^L $FORMAT_LINEFEED $^O $OSNAME ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl One-Liners

Perl One-Liners

Peteris Krumins
Beginning Perl

Beginning Perl

Curtis Ovid Poe
Mastering Perl

Mastering Perl

brian d foy
Perl Best Practices

Perl Best Practices

Damian Conway

Publisher Resources

ISBN: 1565922867Catalog PageErrata