summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-13 06:34:53 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-13 06:34:53 +0000
commitb350dd2f881c6f46f8125355cf7111e4c97d1870 (patch)
tree6bb50e35908a60ca2018f55cba5e3efd2fdf1b11 /pod/perlop.pod
parentc35dd67d21bc3e32533d94409f1aabc5d0c23f0a (diff)
downloadperl-b350dd2f881c6f46f8125355cf7111e4c97d1870.tar.gz
various pod tweaks (from M.J.T. Guy <mjtg@cus.cam.ac.uk>)
p4raw-id: //depot/perl@4359
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod13
1 files changed, 9 insertions, 4 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 14ca6b5ec0..01074b3096 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -510,10 +510,10 @@ The following are recognized:
Although these are grouped by family, they all have the precedence
of assignment.
-Unlike in C, the assignment operator produces a valid lvalue. Modifying
-an assignment is equivalent to doing the assignment and then modifying
-the variable that was assigned to. This is useful for modifying
-a copy of something, like this:
+Unlike in C, the scalar assignment operator produces a valid lvalue.
+Modifying an assignment is equivalent to doing the assignment and
+then modifying the variable that was assigned to. This is useful
+for modifying a copy of something, like this:
($tmp = $global) =~ tr [A-Z] [a-z];
@@ -526,6 +526,11 @@ is equivalent to
$a += 2;
$a *= 3;
+Similarly, a list assignment in list context produces the list of
+lvalues assigned to, and a list assignment in scalar context returns
+the number of elements produced by the expression on the right hand
+side of the assignment.
+
=head2 Comma Operator
Binary "," is the comma operator. In scalar context it evaluates