Perl Monk, Perl Meditation | |
PerlMonks |
Re: Blank data fileby dws (Chancellor) |
on Jul 09, 2002 at 21:12 UTC ( [id://180609]=note: print w/replies, xml ) | Need Help?? |
This increments a tracking counter for use by another script. The problem is that the data file goes blank randomly.
You have a timing window in the code. Consider what happens if you execute open(file, ">$mailclicks); immediately before another process obtains a lock. They now read (and will later write) a blank file. You might want to expand the lifetime of the lock to encompas the entire process.
In Section
Seekers of Perl Wisdom
|
|