Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There is really no point in flocking a temp file that you've just destroyed. If someone
else was using it, too bad, you've just killed their data.
Once you've flocked the input file, are you now the only one that is doing the operation? If so, no more flocking is needed. Just create your temp file, and rename over it, or whatever you were going to do at the end. However, flocking a file you will be renaming over the top is a bit problematic. I've posted other code here that shows a template for that at Exclusively updating a file that continues to be repeatedly read. -- Randal L. Schwartz, Perl hacker In reply to Re: More Eyes
by merlyn
|
|