laziness, impatience, and hubris | |
PerlMonks |
Adding counters for text replacementby bartelby (Initiate) |
on Jul 08, 2012 at 20:51 UTC ( [id://980620]=perlquestion: print w/replies, xml ) | Need Help?? |
bartelby has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
am a beginner so what I need is way out of my league at the moment. Have a text file with html markup in format <p>text text text</p> and basically I need to wrap these sequentially with xliff tags so I get: <bpt i="1" x="1"><p></bpt>text text text<ept i="1"></p></ept>so the bpt as opening and the ept as closing with the next found paired occurrence having counter "2" (<bpt i="2" x="2">) and so on, can someone please help? thanks in advance, bart know it looks strange but it is in fact the syntax that I need thanks for all the input so far xyzzy - I tried running the code but got errors (about spaces and barewords)
Back to
Seekers of Perl Wisdom
|
|