Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucsd!ucbvax!pasteur!yukon.berkeley.edu!lars From: lars@yukon.berkeley.edu (Lars E. Thon) Newsgroups: comp.lang.perl Subject: double ended pipes Summary: do they exist? Keywords: pipe Message-ID: <14083@pasteur.Berkeley.EDU> Date: 12 Jun 91 19:58:04 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: lars@yukon.berkeley.edu.UUCP (Lars E. Thon) Followup-To: comp.lang.perl Distribution: usa Organization: UC Berkeley EECS Dept Lines: 28 One feature that I have been missing from perl is having a double-ended pipe. This could be useful f.ex. if you want to feed a lot of commands to a csh (or some other program) and then analyze output and/or status from the commands. Just as an example, consider the following: #! /usr/local/gnu/bin/perl doublepipe_open(CSH_IN, "| /bin/csh -f |", CSH_OUT); print CSH_IN "echo ~blah"; $pathname= ; print CSH_IN "echo \$status"; $errcode= ; if ($errcode) { print "User blah does not exist ...\n"; } # END I haven't seen a way to do this in perl, except for the obvious (but unsatisfactory) method of using a temp file to store the csh output. Any ideas about this? (Sorry if this is a repost. I don't think it got out on first attempt.) -- ---- Lars E. Thon T. 415-642-9350 211-134 Cory Hall, UC Berkeley, CA 94720