http://www.perlmonks.org?node_id=1140408

OldChamp has asked for the wisdom of the Perl Monks concerning the following question:

How can I get a match counter and use it as a prefix in the peplace term. For example, I have several times "position" in my text and want to peplace it with "position 1", "position 2" and so on. Many thanks in advance!