Your problem is that $oldstr never changes so your test of it using if ($oldstr =~ /core\:para/) is always true. You want to test $_ against that pattern, not $oldstr.
HTH
In reply to Re: search and replace plus counter
by hippo
in thread search and replace plus counter
by Harkers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |