in reply to Re: Re^2: appending to a file
in thread appending to a file

I think IO::AtomicFile would come in handy here. :-)

PS: I see by your quotes that you're a Windows user. You might want to provide a port of your oneliner that works with unix-like shells, or at least mention it.