in reply to Re: How to process multiple input files?
in thread How to process multiple input files?
Putting the declaration of $counter inside the loop should do the trick simply. A better solution might be to rewrite the regex to find the second occurrence of </div> rather than finding all of them and only substituting the second, and "inserting" the content directly rather than repeating the found stuff in the replacement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to process multiple input files?
by jwkrahn (Abbot) on May 23, 2011 at 06:51 UTC | |
by jaredor (Priest) on May 23, 2011 at 12:28 UTC | |
|
Re^3: How to process multiple input files?
by jaredor (Priest) on May 23, 2011 at 05:08 UTC |