This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
introduce @LAST_MATCH_START and @LAST_MATCH_END, English aliases
authorGurusamy Sarathy <gsar@cpan.org>
Mon, 1 May 2000 08:39:18 +0000 (08:39 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 1 May 2000 08:39:18 +0000 (08:39 +0000)
for @- and @+ (from Johan Vromans)

p4raw-id: //depot/perl@6030

lib/English.pm
pod/perlvar.pod

index f6e3ec0..f38c313 100644 (file)
@@ -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.
 
index 4ad8d12..15308e4 100644 (file)
@@ -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.