in reply to Re: Matching pattern in regular expression with string positionin thread Matching pattern in regular expression with string position
Either pos() or $-[0]. You could also write that as my $pos = $-[0].