Skip to content

Commit 1962a97

Browse files
committed
doc list expension with * for Zip operators
1 parent 51383a7 commit 1962a97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/Language/operators.pod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,11 @@ one left, one right, from it's arguments. The resulting list is returned.
293293
my @l = <a b c> Z~ 1,2,3; # [a1 b2 c3]
294294
295295
If one of the operands runs out of elements prematurely, the zip operator will
296-
stop. An infinite list can be used to repeat elements.
296+
stop. An infinite list can be used to repeat elements. A list with a final
297+
element of C<*> will repeat it's 2nd last element indefinitely.
297298
298-
my @l = <a b c d> Z~ ':' xx *; [a: b: c: d:]
299+
my @l = <a b c d> Z~ ':' xx *; # <a: b: c: d:>
300+
my @l = <a b c d> Z~ 1, 2, *; # <a1 b2 c2 d2>
299301
300302
=head2 Sequential Operators
301303

0 commit comments

Comments
 (0)