From: Wolfgang Laun Date: Wed, 14 Mar 2007 07:56:45 +0000 (+0100) Subject: perlfunc.pod (ref results), perlop.pod (qr// result) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=85dd5c8b1ea878e2c60e931a7dfea76be9cfe46d;p=p5sagit%2Fp5-mst-13.2.git perlfunc.pod (ref results), perlop.pod (qr// result) Message-ID: <45F79CAD.5050005@thalesgroup.com> p4raw-id: //depot/perl@30575 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 15b8220..f12b8d9 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4417,6 +4417,14 @@ name is returned instead. You can think of C as a C operator. print "r is not a reference at all.\n"; } +The return value C indicates a reference to an lvalue that is not +a variable. You get this from taking the reference of function calls like +C or C. C is returned if the reference points +to a L. + +The result C indicates that the argument is a regular expression +resulting from C. + See also L. =item rename OLDNAME,NEWNAME diff --git a/pod/perlop.pod b/pod/perlop.pod index 411414c..e02ad41 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -1056,11 +1056,15 @@ This operator quotes (and possibly compiles) its I as a regular expression. I is interpolated the same way as I in C. If "'" is used as the delimiter, no interpolation is done. Returns a Perl value which may be used instead of the -corresponding C expression. +corresponding C expression. The returned value is a +normalized version of the original pattern. It magically differs from +a string containing the same characters: ref(qr/x/) returns "Regexp", +even though dereferencing the result returns undef. For example, $rex = qr/my.STRING/is; + print $rex; # prints (?si-xm:my.STRING) s/$rex/foo/; is equivalent to