in reply to while-loop regex substitution with 'g' option

> differently for matching than for substitution.

I'd say s///g always acts like m//g in list context (all in one go) and has no special single step after pos mode in scalar context.

See perlretut

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery