this should lock the file:
open(FH, ">>somefile.log") or print "can't append to file: $!";
flock(FH, 2) or die "can't flock file: $!";
# ~ output to file
close FH;
At 07:00 AM 8/24/2001, Joe Bellifont wrote:
>Hi,
>I have an html form that when submitted writes to a log file.
>How can I get a lock on this log file?
>
>-because currently if multiple users submit simultaneously, then it leaves
>the log file in a mess.
>
>TIA.
>
>-J
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]