since you mentioned Win32: try binmode on your filehandle.. it will get it right
In reply to Re: chr(26) by Chady in thread how to escape eof - chr(26)? by aquitaine