X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlsub.pod;h=ae128ceb59e3289475953e91f9e7a9829e7b97c6;hb=7817ba4dfeb754838a0da8f159127895c2dcf4fc;hp=f1b87923efa327d0b2db14ba27320339401c023f;hpb=a2293a43268c593a8a95d38299057a646f0fb089;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlsub.pod b/pod/perlsub.pod index f1b8792..ae128ce 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -39,7 +39,7 @@ To call subroutines: Like many languages, Perl provides for user-defined subroutines. These may be located anywhere in the main program, loaded in from other files via the C, C, or C keywords, or -generated on the fly using C or anonymous subroutines (closures). +generated on the fly using C or anonymous subroutines. You can even call a function indirectly using a variable containing its name or a CODE reference. @@ -169,8 +169,8 @@ Do not, however, be tempted to do this: Like the flattened incoming parameter list, the return list is also flattened on return. So all you have managed to do here is stored -everything in C<@a> and made C<@b> an empty list. See L for alternatives. +everything in C<@a> and made C<@b> an empty list. See +L for alternatives. A subroutine may be called using an explicit C<&> prefix. The C<&> is optional in modern Perl, as are parentheses if the @@ -357,7 +357,7 @@ A compilation error results otherwise. An inner block may countermand this with C. A C has both a compile-time and a run-time effect. At compile -time, the compiler takes notice of it. The principle usefulness +time, the compiler takes notice of it. The principal usefulness of this is to quiet C, but it is also essential for generation of closures as detailed in L. Actual initialization is delayed until run time, though, so it gets executed @@ -697,7 +697,7 @@ Despite the existence of C, there are still three places where the C operator still shines. In fact, in these three places, you I use C instead of C. -=over +=over 4 =item 1. You need to give a global variable a temporary value, especially $_.