Click to See Complete Forum and Search --> : learning perl and cgi


Andy Newhouse
11-05-2003, 04:49 AM
i am trying to learn perl and cgi. i have a book. and i have setup a xitami web server. i have setup a perl interpreter and the cgi.pm. i have followed the book on how to set theses up and they test ok. but the last test it an examle like a hello world. its ment to desplay Show me the monkey with my new server. but all i get is a blank web page with no errors. the .pl file only has 3 lines
#!C:\Perl\bin\perl.exe -wT
print "Content-type:text/html\n\n";
print "show me the monkey with my new server!";

thats it. anyone any ideas.

smithtay
11-05-2003, 08:26 AM
The only error I can see is that you need a space between "Content-type:" and "text/html". The browser would think that it isn't a printable page otherwise. Hopefully that will solve it.

I'm guessing you're reading the Perl/CGI book by Elizabeth Castro,

Anyway, Happy Coding!

Jeff Mott
11-05-2003, 05:02 PM
add the following lines to the program.use warnings FATAL => 'all';
use CGI::Carp qw[fatalsToBrowser];Note that this won't solve the problem, but help in figuring out what the problem is.