in reply to Please Suggest me a good Web Hosting for Perl CGI
Put this in your cgi-bin directory as "time.cgi".
this may under a directory like: public_html
Change the permissions so that anybody can read it or execute it.
chmod a+rx cgi-bin/time.cgi
Then you just have to tell folks the URL, maybe:
http:your_machine/~yourName/time.cgi
The user clicks on that link and the program runs.
In this case it just sends an html page with the current time.
Try it!
In this case, the code is inefficient because among other things, there is a huge overhead in the object method calls.#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; my $timestamp = localtime; print $q->header ("text/html"), $q->start_html ( -title => "Current Time"), $q->h2 ("Current Time"), $q->hr, $q->p( "This system figures current time as: ", $q->b($timestamp) ), $q->end_html;
But under a normal ~Unix system where you are allowed to have a cgi-bin directory, this is "hello world".
Get this working and we go from there.
With performance issues and blah,de,blah,de,blah.
|
|---|