Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!scam.Berkeley.EDU!grady From: grady@scam.Berkeley.EDU (Steven Grady) Newsgroups: comp.lang.perl Subject: Need $? for open() Keywords: new feature request Message-ID: <23449@pasteur.Berkeley.EDU> Date: 27 Mar 90 07:08:11 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: grady@postgres.berkeley.edu Organization: Experimental Computing Facility, UC Berkeley Lines: 23 I have a perl program which starts another process and reads the input, using open(). Specifially, the relevant part of the code looks something like: open(RLOG, "rlog $files |") || die "rlog: $@"; while () { ... } The problem is that I don't find out if there's an error. What would be really useful is for the "$?" variable (or something like it) to be set to the status of the program when it exits. Currently, $? is only set by backquoted programs, wait(), and system(). Is there any possibility of adding generic open'ed commands to this list, or at least some mechanism to provide similar functionality? -- Steven grady@postgres.berkeley.edu ...!ucbvax!grady "Shall we go down and give blood?" "Oh, I don't want a great bat flapping round my neck."