Hi, I want to do a substitute g[lobal] *and* know how many substitutions have taken place, without mucking up the MatchResult group information. Here is a contrived testcase that demonstrates how I would do it in Perl:
---->% cut here ---- #!/bin/perl -w $str = "SyStemSStringS"; $count = $str =~ s/S/P/g; print "str now: $str\n"; print "count: $count\n"; ---->% cut here ---- I have searched the archive for this list, consulted the API and hunted through the examples that come with jakarta-oro, but have been unable to find a suggestion for how to do this. Have I missed something? Any pointers on how I can do this using Perl5Util would be gratefully received. Many thanks, -- Michael -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>