in reply to Re: script for adding timestamp to stdin
in thread script for adding timestamp to stdin

thanks -- but the log file is not being updated still... why is that? We have a file handle, we're printing to it... er...
  • Comment on Re^2: script for adding timestamp to stdin

Replies are listed 'Best First'.
Re^3: script for adding timestamp to stdin
by almut (Canon) on Jun 02, 2010 at 19:10 UTC

    Try

    open my $fh, ... use IO::Handle; $fh->autoflush(); # <--

    File handles are block-buffered by default, i.e. output is not flushed/written to the file until the buffer is full.

      great script