Death of perl? Not as long a I'm still a perl n00bie, as I've been for 13 years!
I upgraded my server, and a simple log script doesn't work. If I have the code...
#!/usr/bin/perl
use CGI;
use strict;
use warnings;
my $database = "/full_path/file.shtml";
my $REMOTE_ADDR = "$ENV{'REMOTE_ADDR'}";
my $SCRIPT_URI = "$ENV{'SCRIPT_URI'}";
my $HTTP_USER_AGENT = "$ENV{'HTTP_USER_AGENT'}";
my $HTTP_REFERER = "$ENV{'HTTP_REFERER'}";
my $shortdate = `date +"%D %T %Z"`;
chop ($shortdate);
open (DATABASE,">>$database");
print DATABASE "$REMOTE_ADDR - $shortdate - $SCRIPT_URI - $HTTP_USER_AGENT<!-- - $HTTP_REFERER--><BR>\n";
close(DATABASE);
{
print "Content-Type: text/html\n\n";
print <<EOM;
<PRE>
</PRE>
EOM
exit;
}
Only the date get's added to the database and through SSH, it spits out...
Use of uninitialized value in string at file.cgi line 8.
Use of uninitialized value in string at file.cgi line 9.
Use of uninitialized value in string at file.cgi line 10.
Use of uninitialized value in string at file.cgi line 11.