Examine $-[0] for the start location of your match. This will not help you if you wanted to use the /g switch in list context so there you have to fudge.
my @offsets; while ( /B/g ) { push @offsets, $-[0]; }
In reply to Re: Pattern match location finding
by diotalevi
in thread Pattern match location finding
by feloniousMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |