Skip to content

Commit 297b8a1

Browse files
committed
Fix example for Language/control/last.
1 parent 288e717 commit 297b8a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/Language/control.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)