Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: search and replace plus counter

by hippo (Abbot)
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?
[LanX]: wait... I /ignored NodeRapist
LanX ignore NodeReaper
[LanX]: hmm ...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2018-02-23 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (303 votes). Check out past polls.

    Notices?