perl page does not show up

Hi

i installed xmapp and run my first perl script and it was running fine. But then i put a new perl script and i see done at the firefox bottom but i dont see any thing on the page. I use dzsoft perl editor and it execute the file fine.

here is the code. it suppose to generate a form and calls back the same script again when you send it and prints a message hello. Also could you please tell me what setting i need for form tab so i can make it self-referent script which doesnt open a new page but prints the message "hello" in the same window.

thanks.


#!C:Program Filesxamppperlin

use warnings;
use strict;
use CGI qw(:standard);

print "Content-type: text/html

";
#my $sbmt= param("send");
my $test="checked";
my $title;
my $isbn;
my $type1;
my $type2;
my $type3;
my $type4;
my $tdl;
my $option;

unless (defined param()){ print "hello";
}
else
{
$title="";
$isbn="";
$type1="";
$tdl="";
$option="";

#htmlgenerator("3",$isbn,$type1,$type1,$type1,$type1,$tdl);
htmlgenerator("","","","","","","","","","","");

}
sub htmlgenerator
{
print <<END_OF_MESSAGE;
<html>

Untitled Document







My Library

title

ISBN

Type










Two Day Loan
Borrower Type

Select One
Full-time Students
Part-time Students
Staff
All



END_OF_MESSAGE

Comments

  • your code is missing a curly bracket at the end of the script. The sub routine htmlgenerator has no closing bracket }

    besides that, I don't see anything that would make the script throw up a blank page. Change this line:

    print "Content-type: text/html

    ";

    to:

    print header;


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion