Re: file write problem

2001-09-12 Thread Francesco Scaglioni
THanks, I tried substituting: flock(WRITE_COMMENT, (LOCK_EX() || die("cannot lock comment file: $!"))); to no avail. THe file has been previously opened (for reading) and then closed after, prior to being opened by another sub for appending. The code I used to append worked as part of a stand

Re: file write problem

2001-09-11 Thread Gunther Birznieks
In addition to Randal's lucid explanation of your specific problem. I would encourage you to also use taintmode flag and filter both subject and filename as they are being used to create the file. The commented out attempt to do this with $name shows that you basically may be aware of this, bu

Re: file write problem

2001-09-11 Thread Randal L. Schwartz
> "Francesco" == Francesco Scaglioni <[EMAIL PROTECTED]> writes: Francesco> flock WRITE_COMMENT, LOCK_EX || die "cannot lock comment file: $!"; This is not likely doing what you expect. $ perl -MO=Deparse,-p -e 'use Fcntl qw(:flock); flock WRITE_COMMENT, LOCK_EX || die "cannot lock com

file write problem

2001-09-11 Thread Francesco Scaglioni
Hi, I have a script which collects a comment than should write it to a file. Initialy several scripts did individual jobs but I am combining them. the opening gets the details like this: my $email = param( 'email') || ''; my $text= param( 'text' ) || ''; my $name