Perl: the Markov chain saw | |
PerlMonks |
Re: find and replaceby Zaxo (Archbishop) |
on Dec 21, 2007 at 07:55 UTC ( [id://658408]=note: print w/replies, xml ) | Need Help?? |
If you're reading that line by line, you can't easily back up to make the replacement. If you slurp the input, you need to save multiple matches for "affiliation" tags in a data structure and make another pass. If your input is valid XML, then one of the XML modules may be the best approach. After Compline,
In Section
Seekers of Perl Wisdom
|
|