Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: search and replace plus counter

by hippo (Monsignor)
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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-01-17 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (152 votes). Check out past polls.