Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Delphi
#!C:\Perl\bin\perl

print "Content-type: text/html\r\n\r\n";
print "<HTML>\n";
print "<HEAD><TITLE>Hello World!</TITLE></HEAD>\n";
print "<BODY>\n";
print "<H2>Hello World!</H2>\n";
print "</BODY>\n";
print "</HTML>\n";
exit (0);


i am new in perl.i have written this code in openPerlIDE and after running its give the output in console
Content-type: text/html
<HTML>
<HEAD><TITLE>Hello World!</TITLE></HEAD>
<BODY>
<H2>Hello World!</H2>
</BODY>
</HTML>

how this script run in browser.I am using windows.
Posted
Updated 11-Jan-12 20:10pm
v2
Comments
Andreas Gieriet 12-Jan-12 14:23pm    
Hi ADubey87,


1) you need a web server that you have access to configure and install CGIs

2) you need to configure the web server to run CGI scripts

3) you need to install that script into the CGI file tree of your web server

4) you need to know over which URL you can access the CGI

Depends heavily on the web server you are using.

BTW: PERL and Windows are not a nice fit, assuming you are running IIS web server.

Advise:
- if running IIS, learn aspx concepts
- if running apache on your box, check the apache configuration (CGI section)

In any case: if you stick on PERL, you need to install PERL such that the server can run PERL scripts (under the network user, etc.).

Cheers

Andi

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900