summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-06-22 05:27:28 +0000
committerRicardo Signes <rjbs@semiotic.systems>2021-10-15 09:28:27 -0400
commit2f4c930aab14ce52a5a1ed9b40fac794085453a9 (patch)
tree49dcc955b15ad5abd09d2773c75dcd36706e2607
parent8f5631846920a7d1c689be27bd3e0da651809cc6 (diff)
downloadperl-2f4c930aab14ce52a5a1ed9b40fac794085453a9.tar.gz
perldelta for n-at-a-time for loops.
-rw-r--r--pod/perldelta.pod14
1 files changed, 10 insertions, 4 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 0f73cd6845..d8a5839dd4 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -21,11 +21,17 @@ XXX Any important notices here
=head1 Core Enhancements
-XXX New core language features go here. Summarize user-visible core language
-enhancements. Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
+=head2 iterating over multiple values at a time.
-[ List each enhancement as a =head2 entry ]
+As of Perl 5.36, you can iterate over multiple values at a time by specifying
+a list of lexicals within parentheses. For example,
+
+ for my ($key, $value) (%hash) { ... }
+ for my ($left, $right, $gripping) (@moties) { ... }
+
+Attempting to specify a list after C<for my> was previously a syntax error.
+
+For more detail see L<perlsyn/Compound Statements>.
=head1 Security