December 2000
Intermediate to advanced
784 pages
20h 54m
English
Perl has numerous global variables, many of which affect I/O in one way or another. Each variable is available as a cryptic "punctuation global" and, after loading the English module, optionally as a more friendly English-language variable. Many, but not all, of these variables are also available as IO::Handle class method calls.
For example, the variable $,, which contains the character to print between elements of a list, is available as $OUTPUT_FIELD_SEPARATOR when the English module is loaded, and as the output_field_separator() method when using IO::Handle. The following code fragment illustrates the equivalence relationships:
use IO::Handle; use English; $, = `:'; # print ":" between members of a list $OUTPUT_FIELD_SEPARATOR ...
Read now
Unlock full access