http://qs321.pair.com?node_id=245009


in reply to No \G for s///g ?

\G ... is only supported for m//g, not s///g

I didn't dig into your regex, but I think \G is supported for s///g;

$ perl -le '$_="abc def"; print; s/\G\w/X/g; print' abc def XXX def
-Blake