in reply to Program can not read the contents of a small file that it has recently written!

As Abigail points out, your problems are caused by buffering problems. You might find Dominus' article Suffering from Buffering helpful.

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

  • Comment on Re: Program can not read the contents of a small file that it has recently written!