my $string1 = "abbbbc"; my $found1 = $string1 =~ s/(b*)/^/g; print "\$string1: $string1, \$found1: $found1"; $found1 is 4 =head after s/// $string: ^a^^c^ At begin of string ...no "b" found | # satisfies "0 or more 'b's" "a" (duh!) | Two "b"(s) found | # likewise; the first and second 'b's are conflated? and again | "c" | no "b" after "c" | =cut