ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
3.2.161 subsub The first two of these are not really operators, but rather they
declare the existence of named subroutines, which is why the
syntax includes a The third form really is an operator, in that it can be
used within expressions to generate an anonymous subroutine at run-time. (More
specifically, it returns a reference to an anonymous subroutine, since you can't
talk about something anonymous without some kind of reference to it.) If the
anonymous subroutine refers to any lexical variables declared outside its
The final three forms are identical to the first three, except that they also supply a prototype that lets you specify how calls to your subroutine should be parsed and analyzed, so you can make your routines act more like some of Perl's built-in functions. See "Subroutines" in Chapter 2 and "Anonymous Subroutines" in Chapter 4 for more details. |