ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
3.2.41 formatformat Declares a named sequence of picture lines (with associated values) for
use by the write function. If my $str = "widget"; # A lexically scoped variable. format Nice_Output = Test: @<<<<<<<< @||||| @>>>>> $str, $%, '$' . int($num) . $~ = "Nice_Output"; # Select our format. local $num = $cost * $quantity; # Dynamically scoped variable. write; Like filehandles, format names are identifiers that exist in a symbol table
(package) and may be fully qualified by package name. Within the typeglobs of a
symbol table's entries, formats reside in their own namespace, which is distinct
from filehandles, directory handles, scalars, arrays, hashes, or subroutines.
Like those other six types, however, a format named The "Formats" section in Chapter 2 contains numerous details and examples of their use. The "Per Filehandle Special Variables" and "Global Special Variables" sections in Chapter 2 describe the internal format-specific variables, and the English and FileHandle modules in Chapter 7 provide easier access to them. |