in reply to Re: writing to logfile in a loop
in thread writing to logfile in a loop

The second method requires IO::Handle to be loaded (directly or otherwise).