Mark Jason Dominus <mjd@plover.com> writes: >You said: >> >> seek(FH,0,1); # re-position here >> >> Will discard the buffer contents on a read stream. > >Is that guaranteed to work on all platforms, all implementations, Not yet obviously or we would not have this thread. But is guaranteed to work on a :unix:perlio stream. >forever? I don't expect so. The 'correct' solution would seem to be >to use 'setvbuf', which is part of the C standard. But PerlIO is not a C standard. There may be no stdio involved at all. Personally I refuse to adopt a setvbuf() style API which packs too many options into its args - including some which expose addresses of buffers which is not perl friendly. -- Nick Ing-Simmons http://www.ni-s.u-net.com/