Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: search and replace plus counter

by hippo (Vicar)
on Sep 20, 2013 at 10:17 UTC ( #1054994=note: print w/ replies, xml ) Need Help??


in reply to search and replace plus counter

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


Comment on Re: search and replace plus counter
Select or Download Code
Replies are listed 'Best First'.
Re^2: search and replace plus counter
by Anonymous Monk on Sep 20, 2013 at 10:36 UTC
    Thank you - that works a treat

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054994]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2015-07-31 21:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls