the bossman has requested the following:
he wants my logfiles written to our server in the /tmp directory. my
scripts are in the cgi-bin of our afs account. even though the files are
set with 777 permissions, the outside world can not write to these files.
here is part of one of my scripts:
#don't log these machines into the logfile
my @my_addr = qw(r-squirrel.cc.umr.edu poohbear.cc.umr.edu vixen.cc.umr.edu
helix.cc.umr.edu);
#determine the name and location of the logfile
my $logfile = "/tmp/newlog.txt";
#if the user is one of our machines, don't login
foreach my $address(@my_addr) {
if ($ENV{'REMOTE_HOST'} eq $address) {
&redir;
exit;
}
}
&log;
&redir;
exit;
sub log {
unless (open(LOG,">>$logfile")) {
print "Content-type: text/html\n\n";
print "Couldn't open $logfile\n";
exit;
}
#the logfile is opened
etc, etc
if you can solve this one, then i declare you resident genius of perl.
(at least until i come up with another problem)
:) nichole