in reply to Filehandle Print

My guess is that the buffer has not yet been flushed when you examine the file. If you are only going to print once every 30 seconds, you may as well open/print/close the file on every iteration of the loop (closing will flush the buffer). Alternatively, you can turn off buffering by setting $|=1; before you start printing.

Update: ikegami is correct below, another way to turn off buffering besides directly using select and $| (which you can find further down) is:

use IO::Handle; #(or use IO::File) ... FH->autoflush;

Replies are listed 'Best First'.
Re^2: Filehandle Print
by ikegami (Patriarch) on Jan 26, 2005 at 17:33 UTC

    $|=1 alone will not cut it, since it will only set autoflushing for the currently selected file handle (presumably STDOUT).