citycrew has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I want to read in the entire contents of an mbox file and then clear it immediately after. Considering this is an mbox file, I have to lock it in case new mail comes in. I can't work out the most efficient way to clear the file after reading, without closing it and losing the lock, then opening it again with '>'. If mail arrives in while doing that I've lost it.
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read entire file then clear while flocking
by roboticus (Chancellor) on Nov 04, 2011 at 22:50 UTC | |
by citycrew (Acolyte) on Nov 05, 2011 at 05:04 UTC | |
by roboticus (Chancellor) on Nov 05, 2011 at 15:12 UTC | |
|
Re: Read entire file then clear while flocking
by BrowserUk (Patriarch) on Nov 05, 2011 at 00:10 UTC | |
|
Re: Read entire file then clear while flocking
by JavaFan (Canon) on Nov 05, 2011 at 00:14 UTC | |
by repellent (Priest) on Nov 05, 2011 at 22:12 UTC | |
|
Re: Read entire file then clear while flocking
by Kc12349 (Monk) on Nov 04, 2011 at 22:54 UTC | |
|
Re: Read entire file then clear while flocking
by citycrew (Acolyte) on Nov 05, 2011 at 05:09 UTC |