Skip to content

Commit 6e322dc

Browse files
committed
Document return value of while/repeat loops.
1 parent 9edcf11 commit 6e322dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/Language/control.pod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ $x++ while $x < 12
641641
642642
Also see C<repeat/while> and C<repeat/until> below.
643643
644+
All these forms may produce a return value the same way C<loop> does.
645+
644646
=head2 X<repeat/while, repeat/until|control flow,repeat>
645647
646648
Perl 5 allows one to apply a statement modifier to a C<do> block such that
@@ -665,6 +667,8 @@ This can also be written quite naturally with C<until>:
665667
...
666668
} until $x >= 10;
667669
670+
All these forms may produce a return value the same way C<loop> does.
671+
668672
=head2 X<return|control flow>
669673
670674
=comment TODO

0 commit comments

Comments
 (0)