http://www.perlmonks.org?node_id=154580

shockme has asked for the wisdom of the Perl Monks concerning the following question:

I'm in the process of using my second template (ever), and I've run into a problem. It might be perl-related, or it could turn out to be just an HTML problem. I've stared at the script and template until I'm cross-eyed, and I just can't find the problem. You can see the script execute here.

The problem occurs in the textarea box below the Title. There's nothing there. What I'm expecting to see is this:

Title: Test Node #1 It might someday have something about perl or slashdot or [http://www. +thespark.com] or [http://www.ttuhsc.edu|ttuhsc] or anything I want.
If you view source, it's there. But it's not being displayed in the form.

The script looks like this:

#!/usr/bin/perl -w use strict; use CGI qw/:all/; use exitwound::AccessData qw(&accessData); use HTML::Template; $|++; # disable buffering my $q = new CGI; my $NodeID = $q->param( "NodeID" ); my $ActionName = $q->param( "ActionName" ); my $NodeTitle = $q->param( "NodeTitle" ); my $NodeDate = $q->param( "NodeDate" ); my $NodeSection= $q->param( "NodeSection" ); my $NodeAuthor = $q->param( "NodeAuthor" ); my $NodeContent= $q->param( "NodeContent" ); if (($NodeID) and ($ActionName eq "Modify")) { $ActionName = "Update"; } elsif ($NodeID) { $ActionName = "Modify"; } else { $ActionName = "Insert"; $NodeID = "Unspecified"; } my @DisplayContent; ($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAuthor, $NodeConte +nt, @DisplayContent) = accessData($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAu +thor, $ActionName, $NodeContent); my $template = HTML::Template->new(filename => 'templates/mod-node.tmp +l'); $template->param(NodeSection => $NodeSection, NodeTitle => $NodeTitle, NodeAuthor => $NodeAuthor, NodeDate => $NodeDate, NodeContent => $NodeContent, ActionName => $ActionName, DisplayContent => @DisplayContent, ); print $template->output;
The template is in my scratch pad. (For some reason, it would not display properly here.)

Any advice or insight as to why nothing is being displayed in the textarea box would be greatly appreciated.

Thanks.

If things get any worse, I'll have to ask you to stop helping me.