diff options
author | Martien Verbruggen <mgjv@comdyn.com.au> | 2003-03-15 23:31:47 +1100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-03-21 20:43:55 +0000 |
commit | 457b36cb0e1f520a66f69467509302997f8a52c5 (patch) | |
tree | 5f165e56749c6471986243ed4a7ae2a6ec31613f /pod/perlsub.pod | |
parent | a9852f7cb9f92ad2f16959090e68f5c92d1fe0f1 (diff) | |
download | perl-457b36cb0e1f520a66f69467509302997f8a52c5.tar.gz |
perlsub.pod and perlsyn.pod: better organise scoping info for modifiers
Message-Id: <slrnb750k3.j8t.mgjv@martien.heliotrope.home>
p4raw-id: //depot/perl@19043
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r-- | pod/perlsub.pod | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 918f429a32..2969341ca1 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<elsif> and C<else> clauses, -but not beyond it. - -B<NOTE:> The behaviour of a C<my> statement modified with a statement -modifier conditional or loop construct (e.g. C<my $x if ...>) is -B<undefined>. The value of the C<my> variable may be C<undef>, 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<perlsyn/"Simple statements"> for information +on the scope of variables in statements with modifiers. The C<foreach> loop defaults to scoping its index variable dynamically in the manner of C<local>. However, if the index variable is |