Solved

How to excute this perl script

Posted on 1998-12-26
2
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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…

718 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