|Don't ask to ask, just ask|
File::CounterFile problems : access from mulitple scripts and zeroing counterby hmbscully (Scribe)
|on Sep 26, 2005 at 15:52 UTC||Need Help??|
hmbscully has asked for the wisdom of the Perl Monks concerning the following question:
I have the following code in a larger script which writes a form submission to a flatfile, called each time the form is submitted:
I then have another script that will take the flatfile, check the counter for number of submissions, and email the file to some waiting party:
The problem I am running into is that if I let the File::CounterFile module create the counter file on its own, it ends up with a different owner than the script (or that I have access to) and I cannot access it from this script. I copied the module-created file and renamed it to the file I am now calling, which seems to work.
The problem is I need to zero out the counter each time the above script is run and I can't quite figure out how to do that other than to just delete the file... and when the original script would recreate the file it would have the bad permissions again...
Hoping there is both a quick and dirty and quick and neat solution to this... thanks.