Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: search and replace plus counter

by hippo (Curate)
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
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 exploiting the Monastery: (9)
As of 2014-09-22 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (200 votes), past polls