in reply to Short read error?

I can't see an open for the input file, but presumably the file descriptor is coming from the query string? read usually returns zero when the file descriptor is at EOF. So either the file is empty, or the script that opened the file read it all, in which case you need to seek $file,0,0.

Replies are listed 'Best First'.
Re^2: Short read error?
by JimJx (Beadle) on Feb 19, 2007 at 20:03 UTC
    OK, I hate to admit this, but you lost me. Where would I need to add the seek at?
      Do the seek before the read