start page | rating of books | rating of authors | reviews | copyrights

Book Home Programming PerlSearch this book

32.13. 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, "Special Names", for a complete description of all built-in variables, along with their English aliases.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.