Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!aurora!labrea!agate!ucbvax!ucsd!sdcsvax!nosc!humu!uhccux!lee From: lee@uhccux.UUCP (Greg Lee) Newsgroups: comp.sources.bugs Subject: perl bug Message-ID: <1528@uhccux.UUCP> Date: 5 Feb 88 02:23:17 GMT Organization: U. of Hawaii, Manoa (Honolulu) Lines: 28 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 () { print " true\n"; } else { print " 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 () { print " true\n"; } else { print " false\n"; } if (eof(tst)) { print "STILL EOF\n"; } else { print "LOST EOF\n"; } # Output of this script is: # ok 11 # false # STILL EOF # LOST EOF