rammohan has asked for the wisdom of the Perl Monks concerning the following question:

#!/usr/bin/perl -w use strict; print "Content-type: text/html\n\n"; print "<html><head><title>Hello World!! </title></head>\n"; print "<body><h1>Hello world</h1></body></html>\n";
this is my Perl CGi Script. I saved this script with hello-world.pl and I already installed apache web server for this purpose. Sorry for this basic question posting here . please tell how to run this

Replies are listed 'Best First'.
Re: How to run Perl cgi script on apache server
by marto (Cardinal) on Feb 07, 2014 at 13:42 UTC
Re: How to run Perl cgi script on apache server
by NetWallah (Canon) on Feb 07, 2014 at 15:49 UTC
    Just to give you a starting point for following sundialsvc4 and marto's advice, the first thing you need to do is to configure CGI on Apache.

    Once that is done and tested, Ovid's tutorial referenced above has an excellent first appendix, explaining how to solve all the problems you WILL run into.

            What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
                  -Larry Wall, 1992

Re: How to run Perl cgi script on apache server
by locked_user sundialsvc4 (Abbot) on Feb 07, 2014 at 15:28 UTC

    Definitely agree here.   Your question is truly generic, and truly about CGI (that is to say, “software-generated web pages in general, however made”), not Perl or any other particular language that could be used to do it.   You don’t even know where to begin, yet, so ... “begin at the beginning.”   The web is already stuffed with excellent and detailed tutorials at all levels of complexity ... and that is where you need to begin.   Set aside your immediate goal of getting this-or-that program to work, and spend, say, the next full week seriously studying what Google can bring to you.   Get the big picture.   Really get it.   Then, you can start posing detailed questions, if need be, here or elsewhere.