Path: utzoo!attcan!uunet!seismo!ukma!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hp-pcd!hplsla!hpubvwa!grlab!scott From: scott@grlab.UUCP (Scott Blachowicz) Newsgroups: comp.lang.perl Subject: op.read failure on HPUX v7.0/perl 3.0 pl18 Message-ID: Date: 4 Jun 90 15:24:37 GMT Sender: news@grlab.UUCP Organization: Graphicus, Inc., Kirkland, WA USA Lines: 56 Hi- I just loaded up perl (for the first time). It fails the test 'op.read' on our HP9000/375 running HP-UX v7.0. It seems that the 'seek' to 20000 succeeds. I don't really know why. I can do '@ary = ' to have to whole file sucked in, and that works fine. Is this some "feature" of HP-UX that I've seeing exhibited? Should I really care about this failure? Here is my op.read (with some debugging prints): #!./perl # $Header: op.read,v 3.0 89/10/18 15:30:58 lwall Locked $ print "1..4\n"; open(FOO,'op.read') || open(FOO,'t/op.read') || die "Can't open op.read"; seek(FOO,4,0); $got = read(FOO,$buf,4); print ($got == 4 ? "ok 1\n" : "not ok 1\n"); print ($buf eq "perl" ? "ok 2\n" : "not ok 2 :$buf:\n"); seek(FOO,20000,0) ? print ("# Seek succeeded.\n") : print ("# Seek failed ", $?, "\n"); print ("# Eof = ", eof(FOO) ? "TRUE\n" : "FALSE\n"); print ("# Tell = ", tell(FOO), "\n"); $got = read(FOO,$buf,4); print (($? == 0) ? "# Read succeeded.\n" : "# Read failed.\n"); print ("# Eof = ", eof(FOO) ? "TRUE\n" : "FALSE\n"); print ("# Tell = ", tell(FOO), "\n"); print ($got == 0 ? "ok 3\n" : "not ok 3\n"); print ($buf eq "" ? "ok 4\n" : "not ok 4\n"); print ("# ", $got, " >", $buf, "<\n"); ...and here is the output I get: 1..4 ok 1 ok 2 # Seek succeeded. # Eof = FALSE # Tell = 20000 # Read succeeded. # Eof = FALSE # Tell = 20004 not ok 3 not ok 4 # 4 > Any and all information appreciated... -- Scott Blachowicz E-mail: scott@grlab.UUCP USPS: Graphicus ..or.. ...!hpubvwa!grlab!scott 150 Lake Str S, #206 VoicePh: 206/828-4691 Kirkland, WA USA 98033 FAX: 206/828-4236