Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
I'm writing to a file and every now and then I need to clear it out. Many processes can write to the file, but only one will have write access at any given time (it's locked exclusive for the length of the write)
At certain times, I want to copy the file and then clear the lines from the original. Because it may have serveral active file handles, I dont want to delete it - just empty it
Any ideas on how to do this will be appreciated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Clearing out the file
by jwkrahn (Abbot) on Jul 25, 2006 at 06:39 UTC | |
|
Re: Clearing out the file
by davido (Cardinal) on Jul 25, 2006 at 07:44 UTC | |
by Anonymous Monk on Jul 25, 2006 at 07:51 UTC | |
|
Re: Clearing out the file
by McDarren (Abbot) on Jul 25, 2006 at 08:02 UTC | |
|
Re: Clearing out the file
by madtoperl (Hermit) on Jul 25, 2006 at 07:35 UTC | |
by Hue-Bond (Priest) on Jul 25, 2006 at 14:20 UTC | |
|
Re: Clearing out the file
by Anonymous Monk on Jul 25, 2006 at 07:52 UTC |