http://www.perlmonks.org?node_id=993876


in reply to Identifying the position of match using regular expressions

Look at the special variables @- and @+.

  • Comment on Re: Identifying the position of match using regular expressions