See the flock documentation to check the various (and numerous) available flags, there is probably one of them that'll do what you want :) BTW you really should have posted this in its own thread, because it's a problem completely unrelated to the scope of this tutorial. | [reply] [Watch: Dir/Any] |
For those of you who are interessted in the topic. I solved the problem by myself.
sysopen(FH, $file, O_WRONLY|O_EXCL) or die $!;
works fine for me and it even works if the file is opened via a shared folder.
Finally I want to apologize for my offtopic-postings. I thougt the "fileInUse"-check would be possible with a Win32::OLE-function and because of that I posted here and did not create a new thread. I hope I will do better in future.
Best regards from sunny Germany. | [reply] [Watch: Dir/Any] [d/l] |