good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
RE: RE: Re: This is weird...by chromatic (Archbishop) |
on Jun 17, 2000 at 21:05 UTC ( [id://18654]=note: print w/replies, xml ) | Need Help?? |
I would only use flock if I wanted to access a file and keep any other bits of my program from doing so at the same time. If I thought there were a possibility that one bit could start writing to it, another would become active and start writing to it, that could result in a corrupted output file.
The problem is, flock tends to be advisory. If you really want to ignore a lock on a file, you can get around that. In a small program like this, I don't bother with file locking. In larger programs, where there's an issue of concurrency, it does come up. (So do a lot of other things.)
In Section
Seekers of Perl Wisdom
|
|