Skip to content

Commit 47091a7

Browse files
committed
Mention that "if 0 {...}" slips.
1 parent 3a096df commit 47091a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Language/control.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ conditionally. Do note that the condition is still always evaluated first:
141141
142142
The statement modifier form is probably best used sparingly.
143143
144-
The C<if> statement itself will either return an empty list, if it does not
145-
run the block, or it will return the value which the block produces:
144+
The C<if> statement itself will either L<slip|/type/Slip> us an empty list, if
145+
it does not run the block, or it will return the value which the block produces:
146146
147147
my $c = 0; say (1, (if 1 { $c += 42; 2; }), 3, $c); # says "1 2 3 42"
148148
my $d = 0; say (1, (if 0 { $d += 42; 2; }), 3, $d); # says "1 3 0"

0 commit comments

Comments
 (0)