Discussion Locked

Trouble printing HTML with Perl

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I get the following error message when I try to run the script below: "Your script produced this error: Can't find string terminator 'ENDHTML' anywhere before EOF at ./HTML.cgi line 8. "

What do I need to do in order to make this script run? Thanks in advance for any help you can give.

--------------------------------------------

require TripodCGI;
$CGI = TripodCGI;

$firstName = $CGI->param('firstName');
$lastName = $CGI->param('lastName');
$Age = $CGI->param('Age');
print "Content-type: text/html\n\n";
print <

CGI Test

Welcome!

We're glad to see you $firtName, members of the $lastName family are always welcome here. It's hard to believe that you're already $Age years old. My how time flies.

3 replies

by nihil_angst

It turns out the problem with my script is that it needed a blank line after the closing ENDHTML. Now my page prints, but the variables aren't working. Instead of the desired parameters being passed into the text, nothing prints into the blanks at all. Not even a blank space.

It seems obvious that the problem is with lines 4-6 of my script. If no one's familiar with TripodCGI.pm, could someone tell me how to write lines 4-6 for use with CGI.pm? Thanks in advance for you help.

by jay eckles

I think there's probably something wrong with line 2.
$CGI = TripodCGI;
doesn't make any sense [to me]. What is TripodCGI? Did you mean
$CGI = $TripodCGI::something;

by nihil_angst

Yup, the problem's with line 2. In answer to your question, TripodCGI is a module, "TripodCGI.pm". Anyway, here's the code that solved the problem:

CGI=new Tripod.CGI;

Thanks for your help, Jay.

This discussion is closed to new replies.