Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fuchs From: fuchs@it.uka.de (Harald Fuchs) Newsgroups: comp.lang.perl Subject: Re: Help a perl apprentice Message-ID: Date: 24 Oct 90 06:57:33 GMT References: <18840001@hp-lsd.COS.HP.COM> <10080@jpl-devvax.JPL.NASA.GOV> Sender: news@ira.uka.de (USENET News System) Organization: University of Karlsruhe, FRG Lines: 15 lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: >: open (BDF_PIPE, "bdf $* |"); >A nit, but you want > open (BDF_PIPE, "bdf @ARGV |"); >or better, > open (BDF_PIPE, "bdf @ARGV |") || die "Can't run bdf: $!\n"; Why? open() returns the pid of the subprocess, and this should never be zero even if there is no executable `bdf' in our $PATH. Is there a canonical way to check if an open() involving a pipe succeeded? -- Harald Fuchs ... *gulp*