Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: search and replace plus counter

by hippo (Prior)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2016-08-30 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.