From 0c36ae8bb7516a41c2fbaf6f8015a303918c0fc3 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 22 Jun 2021 05:27:28 +0000 Subject: [PATCH] perldelta for n-at-a-time for loops. --- pod/perldelta.pod | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 93dce844b2bd..625fe477f40a 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 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 was previously a syntax error. + +For more detail see L. =head1 Security