in reply to Matching pattern in regular expression with string position

You could also use the index function:

my $pos = index $variable, 'g';

dave