Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

How to excute this perl script

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
Bala123
Asked:
Bala123
  • 2
1 Solution
 
mikemCommented:
Try This ..

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

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

Mike

0
 
mikemCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now