<?xml version="1.0" encoding="windows-1252"?>
<node id="1001506" title="Re: How to process html script with perl" created="2012-10-30 10:04:22" updated="2012-10-30 10:04:22">
<type id="11">
note</type>
<author id="647953">
sundialsvc4</author>
<data>
<field name="doctext">
&lt;p&gt;
At first, I thought that you wanted to &lt;em&gt;parse&lt;/em&gt; an HTML file as an input, to get information out of it. &amp;nbsp; For that purpose, I would have suggested that you search for &lt;tt&gt;"html parse"&lt;/tt&gt; at [http://search.cpan.org].
&lt;/p&gt;&lt;p&gt;
But instead I think that you may want to &lt;em&gt;generate&lt;/em&gt; a customized HTML content using the file shown above as a &lt;em&gt;template.&lt;/em&gt; &amp;nbsp; There are numerous templating engines available in Perl. &amp;nbsp; My personal favorite happens to be [mod://Template::Toolkit]. &amp;nbsp; Although it is most often used in interactive web-sites, it can be used very well in situations like this, especially when you would like to &lt;em&gt;vary&lt;/em&gt; what is produced, e.g.: &lt;tt&gt;"Thank you for your payment! :-)"&lt;/tt&gt; &lt;i&gt;vs.&lt;/i&gt; &lt;tt&gt;"Pay Up Now, You Scum, Or Your Parakeet Gets It! :-["&lt;/tt&gt; depending on the balance.
&lt;/p&gt;&lt;p&gt;
Start with this tutorial, which deals specifically with how to generate a file (or a string) from a templated source: &amp;nbsp; [mod://Template::Tutorial::Datafile].
&lt;/p&gt;</field>
<field name="root_node">
1001443</field>
<field name="parent_node">
1001443</field>
</data>
</node>
