print problem

Light Poster
22Apr2007,15:38   #1
bhavin12300's Avatar
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
Team Leader
23Apr2007,10:14   #2
pradeep's Avatar
You need to have a blank new line after BHAVIN in the last line!
Light Poster
29Apr2007,08:33   #3
bhavin12300's Avatar
awsome
its working now
thank you