in reply to Match, Capture and get position of multiple patterns in the same string

Probably @- and @+ (covered in perlvar) will get you what you want without your having to resort to computing them.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re: Match, Capture and get position of multiple patterns in the same string