Thank you all for your replies,
>Play around with *FILEHANDLE. For example:
>open FILEHANDLE, ">blah.txt";
>&closeFile( *FILEHANDLE );
>sub closeFile {
> my $fh = shift;
> print $fh "I closed you.\n";
> close $fh;
>}
Still I was not able to delete the file.
>you don't need to lock the file when you are deleting
>it. if you lock the file when you are reading /
writing >/ updating it, the deletion of the file
>is block until the lock is released. the locking of
the >file when you are
>trying to deleting it is uneccessary and might create
>dead lock while your
>delete lock is waiting for the r/w/u lock but the
r/w/u >is again waiting
>for the delete lock. does that make sense? if you
have >coded your lock
>correctly when you are reading / writing / updating
the >file, you don't
>have to lock the file when you are deleting it
because >the operation will
>be blocked until your r/w/u lock is released. simply'
>unlink($filePath);'
>should do it.
>david
I guess that in this case since unlink would not
honour the lock, then it could delete the file anyway,
but what would happen if i delete while a user has not
finished downloading?
I think of putting the files themselves in the
database
but it does not seem right to me.
Thanks once more for your valuable feedback.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]