in reply to Re: Matching pattern in regular expression with string position
in thread Matching pattern in regular expression with string position

Either pos() or $-[0]. You could also write that as my $pos = $-[0].