summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/English.pm4
-rw-r--r--pod/perlvar.pod4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/English.pm b/lib/English.pm
index f6e3ec0021..f38c313beb 100644
--- a/lib/English.pm
+++ b/lib/English.pm
@@ -98,6 +98,8 @@ sub import {
*OSNAME
*LAST_REGEXP_CODE_RESULT
*EXCEPTIONS_BEING_CAUGHT
+ @LAST_MATCH_START
+ @LAST_MATCH_END
);
# The ground of all being. @ARG is deprecated (5.005 makes @_ lexical)
@@ -110,6 +112,8 @@ sub import {
*PREMATCH = *` ;
*POSTMATCH = *' ;
*LAST_PAREN_MATCH = *+ ;
+ *LAST_MATCH_START = *-{ARRAY} ;
+ *LAST_MATCH_END = *+{ARRAY} ;
# Input.
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 4ad8d1248f..15308e45aa 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -174,6 +174,8 @@ example:
(Mnemonic: be positive and forward looking.)
This variable is read-only and dynamically scoped to the current BLOCK.
+=item @LAST_MATCH_END
+
=item @+
This array holds the offsets of the ends of the last successful
@@ -412,6 +414,8 @@ channel.
Used with formats.
(Mnemonic: lines_on_page - lines_printed.)
+=item @LAST_MATCH_START
+
=item @-
$-[0] is the offset of the start of the last successful match.