Skip to content

Commit c1ba6f4

Browse files
committed
Merge pull request #203 from gfldex/master
Fix last example and indentation for next example.
2 parents b420ad8 + f41e3a4 commit c1ba6f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Language/control.pod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,9 @@ The C<next> command starts the next iteration of the loop. So the code
605605
=begin code
606606
607607
my @x = 1, 2, 3, 4, 5;
608-
for @x -> $x {
609-
next if $x == 3;
610-
print $x;
608+
for @x -> $x {
609+
next if $x == 3;
610+
print $x;
611611
}
612612
613613
=end code
@@ -622,7 +622,7 @@ The C<last> command immediately exits the loop in question.
622622
623623
my @x = 1, 2, 3, 4, 5;
624624
for @x -> $x {
625-
next if $x == 3;
625+
last if $x == 3;
626626
print $x;
627627
}
628628

0 commit comments

Comments
 (0)