Prints user's IP address and localtime on the page
6
Prints the user's IP address and localtime on a web page.
#!/usr/bin/perl
#Logger
$time = localtime;
$ip = "$ENV{'REMOTE_ADDR'}";
open(OUT, ">>log.htm");
print OUT "Access from: $ip at $time<p>\n";
close(OUT);





...
But wait .. there are access logs in apache that do all that for you.