Bryan R Harris wrote: > > I'd like to open 2-way pipe to a tool that we have here. It's called > yprtool and once it's open, you give it 3 numbers to its STDIN and it spits > out 3 numbers to its STDOUT. It stays open until you ctrl-c it. > > What's the correct syntax for opening something like this? > > This doesn't work: > > ************************************** > $yprtool = '/Users/bh/Library/models/yprtool'; > open(YPRTOOL, "+<$yprtool|") or die "open error blah"; > print YPRTOOL "$a $b $c\n"; > $return = <YPRTOOL>; > close(YPRTOOL) or die "a cruel death"; > ************************************** > > I think the problem is in the "+<", but I'm not sure. > > - B >
Check out the IPC::Open2 and IPC::Open3 modules, they are standard. perldoc IPC::Open2 perldoc IPC::Open3 Additionally there is good information available in, perldoc perlipc http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>