in reply to Please Suggest me a good Web Hosting for Perl CGI
Put this in your cgi-bin directory as "time.cgi".
Change the permissions so that anybody can read it or execute it.
chmod +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!
#!/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;
|
|---|