<?xml version="1.0" encoding="windows-1252"?>
<node id="1015335" title="Re^2: How to convert a text file to a HTML file" created="2013-01-25 07:20:45" updated="2013-01-25 07:20:45">
<type id="11">
note</type>
<author id="681898">
Utilitarian</author>
<data>
<field name="doctext">
Meh, why do any work ;)
&lt;c&gt;
#!/usr/bin/perl
use strict;
use warnings;

open my $HTML, '&gt;', 'output.html' or die $!;

print $HTML &lt;&lt;'_END_HEADER_';
&lt;html&gt;
&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;pre&gt;
_END_HEADER_

open my $IN, '&lt;', 'input.txt' or die $!;
print $HTML while &lt;$IN&gt;;


print $HTML '&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;';
close $HTML or die $!;
&lt;/c&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-681898"&gt;
&lt;c&gt;print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."&lt;/c&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1015328</field>
<field name="parent_node">
1015332</field>
</data>
</node>
