Skip to Content
Programming Perl, 3rd Edition
book

Programming Perl, 3rd Edition

by Larry Wall, Tom Christiansen, Jon Orwant
July 2000
Intermediate to advanced
1104 pages
35h 1m
English
O'Reilly Media, Inc.
Content preview from Programming Perl, 3rd Edition

English

use English;

# Use awk-style names.
$RS = '';                   # instead of $/
while (<>) {
    next if $NR < 10;       # instead of $.
    …
}

# Same thing, but even more cobolaciously.
$INPUT_RECORD_SEPARATOR = '';
while (<>) {
    next if $INPUT_LINE_NUMBER < 10;
    …
}

The English module provides cumbersome aliases for the built-in variables for prodigious typists with a visceral dislike for nonalphabetic identifiers (and a visceral like for the Caps Lock key). As with all imports, these aliases are only available in the current package. The variables are still available under their real names. For example, once you use this module, you can use $PID if $$ bothers you, or $PROGRAM_NAME if $0 makes you queasy. Some variables have more than one alias. See Chapter 28, for a complete description of all built-in variables, along with their English aliases.

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

Programming Perl, 4th Edition

Programming Perl, 4th Edition

Tom Christiansen, brian d foy, Larry Wall, Jon Orwant
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix
Programming the Perl DBI

Programming the Perl DBI

Tim Bunce, Alligator Descartes

Publisher Resources

ISBN: 0596000278Supplemental ContentErrata