good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Storing Substitution Output Stringby rattusillegitimus (Friar) |
on Jul 14, 2002 at 19:07 UTC ( [id://181631]=note: print w/replies, xml ) | Need Help?? |
Perhaps it's because now that I have a hammer, everything looks like a nail, but that sounds like an ideal use for XSLT. I've had a great deal of luck using XML::LibXML and XML::LibXSLT in conjunction to do things very like what you're describing. Your script would be something along the lines of:
* Code above adapted from the XML::LibXSLT docs
The above script and XSL file together yield the following output:
This may well be too heavy handed if your project is relatively small, but if there are more chunks you are trying to capture in similar ways, you might consider such an approach. __________He seemed like such a nice guy to his neighbors / Kept to himself and never bothered them with favors - Jefferson Airplane, "Assassin" Update: Whoops, in other words, what trs80 said above ;)
In Section
Seekers of Perl Wisdom
|
|