You are viewing the version of this documentation from Perl 5.12.3. View the latest version
$POSTMATCH
$'

The string following whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval() enclosed by the current BLOCK). (Mnemonic: ' often follows a quoted string.) Example:

local $_ = 'abcdefghi';
/def/;
print "$`:$&:$'\n";  	# prints abc:def:ghi

This variable is read-only and dynamically scoped to the current BLOCK.

The use of this variable anywhere in a program imposes a considerable performance penalty on all regular expression matches. See "BUGS".

See "@-" for a replacement.