Because I am not a very good perl programmer (but working on it) an unable
to answer most of the questions from the group, I thought I could at least
contribute what I have learned so I can help others that are in my position.

Today I learned something about XML::Writer where I was using single quotes
instead of double quotes and it caused me all sorts of problems later in the
script.  Here is my corrected code:

use strict;
use CGI;
use CGI::Carp;
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(escapeHTML);
use XML::Writer;
use IO::File;

my $output = new IO::File(">test.xml");
my $writer = new XML::Writer(OUTPUT => $output);
$writer->startTag("greeting","class" => "simple");  # It was here that I was
using singles instead of doubles and it caused problems later on.
$writer->characters("Hello, world!");
$writer->endTag("greeting");
$writer->end();
$output->close();

my $page = new CGI;
my $htmldoc;
$htmldoc .= "Testing Testing";
print $page->header;                    # create the HTTP header
print $page->start_html('TEST PAGE'); # start the HTML
print $htmldoc;
print $page->end_html;

Thanks to people in the group who have helped me.  It is a great resource.

Reply via email to