print problem

bhavin12300's Avatar, Join Date: Apr 2007
Light Poster
hi
i have created one pl cript and running it in windows using browser

here is the simple code


Code: Perl
#! /usr/bin/perl
   
   $obj=new CGI();
   print $obj->header();
   
   
   print <<"BHAVIN";
   
   
   
   
   <H1>HELLO WORLD
   
   
   BHAVIN

and its it giving me following error

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Can't find string terminator "BHAVIN" anywhere before EOF at C:\Inetpub\Scripts\A.pl line 7.

Last edited by pradeep; 23Apr2007 at 10:15.. Reason: Code formatting
pradeep's Avatar, Join Date: Apr 2005
Team Leader
You need to have a blank new line after BHAVIN in the last line!
bhavin12300's Avatar, Join Date: Apr 2007
Light Poster
awsome
its working now
thank you