Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: read/write pipe Message-ID: <11649@jpl-devvax.JPL.NASA.GOV> Date: 1 Mar 91 18:50:32 GMT References: <1991Feb25.023300.7836@uvaarpa.Virginia.EDU> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 19 In article ea08+@andrew.cmu.edu (Eric A. Anderson) writes: : For whatever reason, I found that open(FOO,'ftp |'); allowed me to do : both writes and reads from FOO. Is this a mis-feature or something? Uh, you might well be able to write to the input pipe if it's implemented as a socket or stream, but the real question is why ftp would be reading its stdout. Are you actually able to interact with ftp this way? Weird. ftp's stdin should be hooked up to whatever stdin your perl script is using. : Because I find this fundamentaly useful, I want a program which can do : things with ftp sessions. (Primarily, get all files under some : directory subject to certain constraints.) The only other way to do : this would be to write a C program containing all of ftp which seems : like overkill. Am I in risk of a deadlock or something? Not likely with ftp, as long as you stay in sync and read everything there is to read before going on to the next command. Larry