summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlfunc.pod8
-rw-r--r--pod/perlop.pod6
2 files changed, 13 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 15b8220839..f12b8d9feb 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4417,6 +4417,14 @@ name is returned instead. You can think of C<ref> as a C<typeof> operator.
print "r is not a reference at all.\n";
}
+The return value C<LVALUE> indicates a reference to an lvalue that is not
+a variable. You get this from taking the reference of function calls like
+C<pos()> or C<substr()>. C<VSTRING> is returned if the reference points
+to a L<version string|perldata\"Version Strings">.
+
+The result C<Regexp> indicates that the argument is a regular expression
+resulting from C<qr//>.
+
See also L<perlref>.
=item rename OLDNAME,NEWNAME
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 411414c815..e02ad41f50 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -1056,11 +1056,15 @@ This operator quotes (and possibly compiles) its I<STRING> as a regular
expression. I<STRING> is interpolated the same way as I<PATTERN>
in C<m/PATTERN/>. If "'" is used as the delimiter, no interpolation
is done. Returns a Perl value which may be used instead of the
-corresponding C</STRING/imosx> expression.
+corresponding C</STRING/imosx> 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