Solved

executing Perl script

Posted on 1998-12-25
4
298 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
4 Comments
 
LVL 1

Expert Comment

by:wisdom042597
ID: 1830292
If you're getting an error, then you probably are executing the script (technically speaking).  I'd need to see the source to help debug the script - or at least the problem part.

Also, it depends upon whether you want to execute the script on your local machine, or on an internet server at your ISP.
0
 

Author Comment

by:Bala123
ID: 1830293
Edited text of question
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830294
the closing tag to trminate a here-document should be alone on the line with no extra white space, and no extra semicolon
0
 
LVL 1

Accepted Solution

by:
cox earned 50 total points
ID: 1830295
use this:

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

print<<EOF;
<HTML>
<BODY>
<H1> Hello World </H1>
</BODY>
</HTML>
EOF

Take off the "  ; " at last line...
  ;))
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
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 …
The viewer will learn how to count occurrences of each item in an array.

864 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now