in reply to Blank data file
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.
|
|---|