@@ -330,11 +330,16 @@ operator is not as well defined for negative operands, but it will
330
330
execute faster.
331
331
X<%> X<remainder> X<modulo> X<mod>
332
332
333
- Binary C<"x"> is the repetition operator. In scalar context or if the left
334
- operand is not enclosed in parentheses, it returns a string consisting
335
- of the left operand repeated the number of times specified by the right
336
- operand. In list context, if the left operand is enclosed in
337
- parentheses or is a list formed by C<qw/I<STRING>/>, it repeats the list.
333
+ Binary C<x> is the repetition operator. In scalar context, or if the
334
+ left operand is neither enclosed in parentheses nor a C<qw//> list,
335
+ it performs a string repetition. In that case it supplies scalar
336
+ context to the left operand, and returns a string consisting of the
337
+ left operand string repeated the number of times specified by the right
338
+ operand. If the C<x> is in list context, and the left operand is either
339
+ enclosed in parentheses or a C<qw//> list, it performs a list repetition.
340
+ In that case it supplies list context to the left operand, and returns
341
+ a list consisting of the left operand list repeated the number of times
342
+ specified by the right operand.
338
343
If the right operand is zero or negative (raising a warning on
339
344
negative), it returns an empty string
340
345
or an empty list, depending on the context.
0 commit comments