$\="\n"; $_='aaa'; my $c='a'; print "$c:$_"; print "------"; print "$c:$_" while s/$c/$c++/oe; print "------"; print "$c:$_";