Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!io!al From: al@io.ee.pitt.edu (Alan Martello) Newsgroups: comp.lang.perl Subject: reading AND writing to processes Message-ID: <7497@pitt.UUCP> Date: 3 May 90 17:40:24 GMT Sender: news@pitt.UUCP Reply-To: al@io.ee.pitt.edu (Alan Martello) Organization: Electrical Engineering, Univ. of Pittsburgh Lines: 26 I have a perl script which must rsh to another system and run specific commands (depending on the result of querying the system with other commands). The following works as expected: open (RSH_FH, "rsh othermachine ls |"); but is a little too clunky for my needs (I don't want an open for each command). Instead, I'd prefer something like the following: open (RSH_FH, "| rsh othermachine |"); That is, I want to read AND write to the same rsh process. For example, the first thing I need to do is to supply a password if logging in as a different user. I tried minimal experimentation and couldn't get it to do the desired thing... Perhaps a perl/shell wizard can shed some light on the feasability of my endeavor. I though about trying to use forks, etc. but didn't try it. Ideas? ******************************************************************* Alan R. Martello Electrical Engineering Dept. al@ee.pitt.edu University of Pittsburgh *******************************************************************