From: Martien Verbruggen Date: Sat, 15 Mar 2003 12:31:47 +0000 (+1100) Subject: perlsub.pod and perlsyn.pod: better organise scoping info for modifiers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=457b36cb0e1f520a66f69467509302997f8a52c5;p=p5sagit%2Fp5-mst-13.2.git perlsub.pod and perlsyn.pod: better organise scoping info for modifiers Message-Id: p4raw-id: //depot/perl@19043 --- diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 918f429..2969341 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -325,14 +325,8 @@ it. Similarly, in the conditional the scope of $answer extends from its declaration through the rest of that conditional, including any C and C clauses, -but not beyond it. - -B The behaviour of a C statement modified with a statement -modifier conditional or loop construct (e.g. C) is -B. The value of the C variable may be C, any -previously assigned value, or possibly anything else. Don't rely on -it. Future versions of perl might do something different from the -version of perl you try it out on. Here be dragons. +but not beyond it. See L for information +on the scope of variables in statements with modifiers. The C loop defaults to scoping its index variable dynamically in the manner of C. However, if the index variable is diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 0d81b24..16bca2d 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -134,6 +134,13 @@ For C, you have to be more elaborate: } while $x++ <= $z; } +B The behaviour of a C statement modified with a statement +modifier conditional or loop construct (e.g. C) is +B. The value of the C variable may be C, any +previously assigned value, or possibly anything else. Don't rely on +it. Future versions of perl might do something different from the +version of perl you try it out on. Here be dragons. + =head2 Compound statements In Perl, a sequence of statements that defines a scope is called a block.