"Perl Programmers Reference Guide (англ.) (программ.) /19.12.1998/ " - читать интересную книгу автора string, as is any single identifier within a hash
subscript. Our earlier example, 14/Jun/98 perl 5.005, patch 02 13 PERLDATA(1) Perl Programmers Reference Guide PERLDATA(1) $days{'Feb'} can be written as $days{Feb} and the quotes will be assumed automatically. But anything more complicated in the subscript will be interpreted as an expression. Note that a single-quoted string must be separated from a (though deprecated) character in a variable name (see the Packages entry in the _p_e_r_l_m_o_d manpage). Three special literals are __FILE__, __LINE__, and __PACKAGE__, which represent the current filename, line number, and package name at that point in your program. They may be used only as separate tokens; they will not be interpolated into strings. If there is no current package (due to an empty package; directive), __PACKAGE__ is the undefined value. The tokens __END__ and __DATA__ may be used to indicate the logical end of the script before the actual end of file. Any following text is ignored, but may be read via a DATA filehandle: main::DATA for __END__, or PACKNAME::DATA (where PACKNAME is the current package) for __DATA__. The two control characters ^D and ^Z are synonyms for __END__ (or __DATA__ in a module). See the _S_e_l_f_L_o_a_d_e_r manpage for more description of __DATA__, and an example of its use. Note that you cannot read from the DATA filehandle in a BEGIN block: the BEGIN block is executed as soon as it is seen (during compilation), at which point the corresponding __DATA__ (or __END__) token has not yet been seen. |
|
|