pod/perlsyn: for is equivalent to "foreach'
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>
Sat, 26 Nov 2011 22:58:22 +0000 (22:58 +0000)
committerÆvar Arnfjörð Bjarmason <avar@cpan.org>
Wed, 30 Nov 2011 23:05:22 +0000 (23:05 +0000)
Change the Compound Statements section to not like by omission. Both
for and foreach can be used as C-style and Perl-style for-loops, but
the documentation pretended that "for" was always C-style and
"foreach" was always Perl-style.

pod/perlsyn.pod

index 3d4825a..fd4c745 100644 (file)
@@ -236,6 +236,9 @@ The following compound statements may be used to control flow:
     LABEL until (EXPR) BLOCK
     LABEL until (EXPR) BLOCK continue BLOCK
     LABEL for (EXPR; EXPR; EXPR) BLOCK
+    LABEL for VAR (LIST) BLOCK
+    LABEL for VAR (LIST) BLOCK continue BLOCK
+    LABEL foreach (EXPR; EXPR; EXPR) BLOCK
     LABEL foreach VAR (LIST) BLOCK
     LABEL foreach VAR (LIST) BLOCK continue BLOCK
     LABEL BLOCK continue BLOCK