Solved

How to excute this perl script

Posted on 1998-12-26
2
213 Views
Last Modified: 2013-12-25
I have written CGI script in PERL,
Error shown : "String Termination after the line content type"
Q : How to execute it?
print "Content-type: /text/html\n\n";

print<<EOF;
<HTML>
<BODY>
<H1> Hello world </H1>
</BODY>
</HTML>
EOF
0
Comment
Question by:Bala123
  • 2
2 Comments
 
LVL 4

Accepted Solution

by:
mikem earned 50 total points
ID: 1830296
Try This ..

print "Content-type: /text/html\n\n";

   print "<<EOF;
   <HTML>
   <BODY>
   <H1> Hello world </H1>
   </BODY>
   </HTML>";
   EOF

Mike

0
 
LVL 4

Expert Comment

by:mikem
ID: 1830297
Oops!

Further to my answer, you have not closed the print so the program is still looking for the end of the "file"..

Change my answer to

print "Content-type: /text/html\n\n";
      print<<EOF
      <HTML>
      <BODY>
      <H1>Hello world</H1>
      </BODY>
      </HTML>
EOF
## Note the last line has no leading spaces..


0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question