From: Ævar Arnfjörð Bjarmason Date: Sat, 26 Nov 2011 22:58:22 +0000 (+0000) Subject: pod/perlsyn: for is equivalent to "foreach' X-Git-Tag: v5.15.6~287 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/7808b687687543f1e22b9c4c467de99d2a9a6144 pod/perlsyn: for is equivalent to "foreach' 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. --- diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 3d4825a..fd4c745 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -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