in reply to Getting information about regexp matches

I'm not quite sure if I get you right, but maybe you should take a look into perlman:perlvar and $& for the match, $` for the prematch and $' for the postmatch. If you use English you can even use $MATCH, $PREMATCH and $POSTMATCH.
--
use signature; signature(" So long\nAlfie");

Replies are listed 'Best First'.
Re: Re: Getting information about regexp matches
by snowcrash (Friar) on Apr 23, 2001 at 14:56 UTC
    don't use these when you don't have to: from man perlvar

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

    snowcrash //////