summaryrefslogtreecommitdiff
path: root/pod/perlsyn.pod
diff options
context:
space:
mode:
authorEugen Konkov <kes-kes@yandex.ru>2019-09-06 15:06:38 +0300
committerKarl Williamson <khw@cpan.org>2022-04-16 13:49:26 -0600
commit73bc018bb73b3e06d1251947efc8bab6268fba9f (patch)
treec6c9c4bd474efafdf52816f134326b601376aa52 /pod/perlsyn.pod
parent27bf08d22dce7c8c15a8e0510e9b6838c1f1426f (diff)
downloadperl-73bc018bb73b3e06d1251947efc8bab6268fba9f.tar.gz
perlsyn: Clarify loop localization
Currently `foreach` and `for` loops are synonyms. Thus implicit localization occurs not only for `foreach`. This change clarifies that implicit localization occurs depending on style
Diffstat (limited to 'pod/perlsyn.pod')
-rw-r--r--pod/perlsyn.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 463ababa2d..8e6909b3fd 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -527,8 +527,8 @@ is therefore visible only within the loop. Otherwise, the variable is
implicitly local to the loop and regains its former value upon exiting
the loop. If the variable was previously declared with C<my>, it uses
that variable instead of the global one, but it's still localized to
-the loop. This implicit localization occurs I<only> in a C<foreach>
-loop.
+the loop. This implicit localization occurs I<only> for non C-style
+loops.
X<my> X<local>
The C<foreach> keyword is actually a synonym for the C<for> keyword, so