diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-13 06:34:53 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-13 06:34:53 +0000 |
commit | 270d6d6760ea16ef19657eff36929596470a0a3d (patch) | |
tree | 6bb50e35908a60ca2018f55cba5e3efd2fdf1b11 /pod/perlop.pod | |
parent | 7964b89e9576c7b0c707831c48490c6b5c44eeb1 (diff) | |
download | perl-270d6d6760ea16ef19657eff36929596470a0a3d.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.pod | 13 |
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 |