From 6bb4e6d4b29a3eb5c60219c3bd690a32ca618ec1 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Tue, 14 Jul 1998 23:45:58 +0000 Subject: [PATCH] doc patches from Gisle Aas Date: 14 Jul 1998 16:18:31 +0200 Message-ID: Subject: [PATCH] substr/splice changes for perldelta.pod -- Date: 14 Jul 1998 20:31:27 +0200 Message-ID: Subject: [PATCH] Duplicate description of use integer % p4raw-id: //depot/perl@1494 --- pod/perldelta.pod | 11 +++++++++++ pod/perlop.pod | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index d1f0261..e271e7d 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -266,6 +266,17 @@ See L. Several missing hooks have been added. There is also a new base class for TIEARRAY implementations. See L. +=head2 4th argument to substr + +substr() can now both return and replace in one operation. The optional +4th argument is the replacement string. See L. + +=head2 Negative LENGTH argument to splice + +Splice() with a negative LENGTH argument now work similar to what the +LENGTH did for substr(). Previously a negative LENGTH was treated as +0. See L. + =head1 Supported Platforms diff --git a/pod/perlop.pod b/pod/perlop.pod index d9cfccf..07ff51a 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -187,10 +187,7 @@ operands C<$a> and C<$b>: If C<$b> is positive, then C<$a % $b> is C<$a> minus the largest multiple of C<$b> that is not greater than C<$a>. If C<$b> is negative, then C<$a % $b> is C<$a> minus the smallest multiple of C<$b> that is not less than C<$a> (i.e. the -result will be less than or equal to zero). If C is -in effect, the native hardware will be used instead of this rule, -which may be construed a bug that will be fixed at some point. - +result will be less than or equal to zero). Note than when C is in scope, "%" give you direct access to the modulus operator as implemented by your C compiler. This operator is not as well defined for negative operands, but it will -- 2.7.4