Skip to content

Commit baa653c

Browse files
committed
Reword about ~$/ vs $/.Str.
Link to the match object.
1 parent 6ed3006 commit baa653c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/Language/5to6-perlvar.pod6

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,11 @@ to C<$/[0]>, C<$1> is equivalent to C<$/[1]>, etc.
317317
318318
=item $&
319319
320-
C<$/> now contains the match object, so the Perl 5 behavior of C<$&> can
321-
be obtained by stringifying it, i. e. C<~$/>. C<$/.Str> also should
322-
work, but C<~$/> is the currently more common idiom.
320+
C<$/> now contains the L<match|/type/Match> object, so the Perl 5 behavior of C<$&> can
321+
be obtained by stringifying it, i. e. C<~$/>.
322+
323+
Please note that while C<$/.Str> should also work,
324+
C<~$/> is currently the more common idiom.
323325
324326
=item ${^MATCH}
325327

0 commit comments

Comments
 (0)