#!/usr/local/bin/perl use strict; my $time = localtime; print "Content-Type: text/html\n\n"; print "The current time on this server is: $time";
#!/usr/local/bin/perl
use strict;
print "Content-Type: text/html\n\n";
> chmod 0755 <script>.cgi
~<user>/course_html/
http://sigma10:8000/~<user>/course_html/localtime.cgi
> cd > chmod 711 . > chmod 711 course_html
#!/usr/local/bin/perl
use strict;
print <<END_OF_HTML;
Content-Type: text/html
<table border>
<tr>
<td>Request method
<td>$ENV{'REQUEST_METHOD'}
<tr>
<td>Data from GET
<td>$ENV{'QUERY_STRING'}
<tr>
<td>Data from POST
<td>$ENV{'CONTENT_LENGTH'}
</table>
END_OF_HTML
#!/usr/local/bin/perl
use strict;
print "Content-Type: text/html\n\n";
my $name;
foreach $name (sort keys %ENV) {
print "<p><b>$name</b><br>";
print "$ENV{$name}";
}
print "Content-Type: text/html\n\n"
print "Location: such_and_such_document.html\n\n";