Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to excute this perl script

Posted on 1998-12-26
2
Medium Priority
?
243 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 100 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

963 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