From: Gurusamy Sarathy Date: Thu, 14 Oct 1999 18:26:56 +0000 (+0000) Subject: clarify significance of parens for "x" (from M.J.T. Guy X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=62d10b704aa877d24f326d3b46b7eceb38549c98;p=p5sagit%2Fp5-mst-13.2.git clarify significance of parens for "x" (from M.J.T. Guy ) p4raw-id: //depot/perl@4379 --- diff --git a/pod/perlop.pod b/pod/perlop.pod index e563888..6e65ba3 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -195,10 +195,11 @@ to the modulus operator as implemented by your C compiler. This operator is not as well defined for negative operands, but it will execute faster. -Binary "x" is the repetition operator. In scalar context, it -returns a string consisting of the left operand repeated the number of -times specified by the right operand. In list context, if the left -operand is a list in parentheses, it repeats the list. +Binary "x" is the repetition operator. In scalar context or if the left +operand is not enclosed in parentheses, it returns a string consisting +of the left operand repeated the number of times specified by the right +operand. In list context, if the left operand is enclosed in +parentheses, it repeats the list. print '-' x 80; # print row of dashes