From: Rafael Garcia-Suarez Date: Wed, 26 Jun 2002 20:32:20 +0000 (+0000) Subject: chomp clarifications by Elizabeth Mattijsen. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=15e44fd86a5871862b91224f8af15fd19c795fd7;p=p5sagit%2Fp5-mst-13.2.git chomp clarifications by Elizabeth Mattijsen. p4raw-id: //depot/perl@17367 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index c617e94..b4b8646 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -653,6 +653,13 @@ You can actually chomp anything that's an lvalue, including an assignment: If you chomp a list, each element is chomped, and the total number of characters removed is returned. +Note that parentheses are necessary when you're chomping anything +that is not a simple variable. This is because C +is interpreted as C<(chomp $cwd) = `pwd`;>, rather than as +C which you might expect. Similarly, +C is interpreted as C rather than +as C. + =item chop VARIABLE =item chop( LIST ) @@ -672,6 +679,8 @@ last C is returned. Note that C returns the last character. To return all but the last character, use C. +See also L. + =item chown LIST Changes the owner (and group) of a list of files. The first two