From: Jim Freeze Date: 2002-07-08T12:58:13+09:00 Subject: How to determine EOF with sysread? Hi: How does one determine the eof when using sysread. The example below seems to indicate that using #eof? corrupts the file pointer. buff_size = File.stat(ARGV[0]).blksize File.open(ARGV[0]) { |f| # until f.eof? ## this statement corrupts f buff = f.sysread(buff_size) print buff # end } Thanks -- Jim Freeze If only I had something clever to say for my comment... ~