in reply to Restarting counters in text
further to the other comment (correcting != to !~, I guess), if you have the whole content stored and sub out all instances of <exm>, then the second resetting line will never happen.
You need to do it line by line, and s///s does the whole thing at once.
edit This is utter nonsense, of course. What I meant to say was:
then the second resetting line will ALWAYS happen.
I don't know what way these lines are coming in - whether he's getting blocks of code with exm's, and never gets a second line containing exms that he wants to be contiguous. I've no idea, but I had sort of confused myself a bit.
Sorry for the late edit
You need to do it line by line, and s///s does the whole thing at once.
edit This is utter nonsense, of course. What I meant to say was:
then the second resetting line will ALWAYS happen.
I don't know what way these lines are coming in - whether he's getting blocks of code with exm's, and never gets a second line containing exms that he wants to be contiguous. I've no idea, but I had sort of confused myself a bit.
Sorry for the late edit
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Restarting counters in text
by udinakar (Novice) on Aug 10, 2006 at 11:35 UTC | |
by davorg (Chancellor) on Aug 10, 2006 at 11:39 UTC | |
by udinakar (Novice) on Aug 10, 2006 at 11:45 UTC |
In Section
Seekers of Perl Wisdom