PROTECTED]]
Sent: Tuesday, May 07, 2002 1:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Little code fragment request (Is this code ok?)
Well, after searching I come to this:
#---
sub WriteLog
{
open(OUTF,$filenamedate.dat) or die(Couldn't open $filenamedate.dat
for writing
Yes, it is UNIX. I also read it won't work on Windows.
Rafael
Scot Robnett [EMAIL PROTECTED] escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is this on UNIX? Somebody on the list please correct me if I'm wrong, but
I don't believe flock will work on Windows, and I have no
-Original Message-
From: Rafael Cotta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 2:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Little code fragment request (Is this code ok?)
Well, after searching I come to this:
#---
sub WriteLog
{
open(OUTF
Well, after searching I come to this:
#---
sub WriteLog
{
open(OUTF,$filenamedate.dat) or die(Couldn't open $filenamedate.dat
for writing: $!);
# This locks the file so no other CGI can write to it at the
# same time...
flock(OUTF,2);
# Reset the file pointer to the end of