in reply to Replacement regular expression which return the number of replacement it does

See the perlretut tutorial on regular expressions and search for this (which specifically deals with s///)

This example counts character frequencies in a line:
Pancho
  • Comment on Re: Replacement regular expression which return the number of replacement it does