lee@uhccux.UUCP (Greg Lee) (02/05/88)
Perl, patchlevel 11 on Ultrix 1.2, fails tests 3 and 12 of t/io.tell. It seems that when you are at the end of a file and access the file descriptor, something funny happens. The next test for end of file works, but subsequent ones do not work correctly. I attached below a script that exhibits the difficulty perhaps more plainly. Not saying its really a bug -- I may well have made a mistake of some sort. Greg, lee@uhccux.uhcc.hawaii.edu ------------------- #!./perl # perl fails io.tell tests 3 and 12. Furthermore, this # script gives funny results ... open(tst, '../Makefile') || (die "Can't open ../Makefile"); if (seek(tst,0,2)) { print "ok 11\n"; } else { print "not ok 11\n"; } # if next line present, 2nd eof test below fails if (<tst>) { print "<tst> true\n"; } else { print "<tst> false\n"; } if (eof(tst)) { print "STILL EOF\n"; } else { print "LOST EOF\n"; } # if next line present as well as preceding, dumps core #if (<tst>) { print "<tst> true\n"; } else { print "<tst> false\n"; } if (eof(tst)) { print "STILL EOF\n"; } else { print "LOST EOF\n"; } # Output of this script is: # ok 11 # <tst> false # STILL EOF # LOST EOF