Re: executing binaries

2002-07-17 Thread Chris Knipe
July 17, 2002 10:38 PM Subject: Re: executing binaries > I got it working on the shell now: > > savage@netsonic:~/src# perl -MIPC::Open2 -e'open2(*rd, *wr, "/bin/ls -al"); > while () { print; } exit;' > total 32 > drwxr-x--- 8 root wheel512 Jul 17 03:29 .

Re: executing binaries

2002-07-17 Thread Chris Knipe
ris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 10:27 PM Subject: Re: executing binaries > Chris Knipe wrote: > > savage@netsonic:~/src# perl -MIPC::Open2 -e'open2($rd, $wr, "ls -al"); > while > > (<$rd>) { p

RE: executing binaries

2002-07-17 Thread Bob Showalter
> -Original Message- > From: Chris Knipe [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 17, 2002 4:19 PM > To: [EMAIL PROTECTED] > Subject: Re: executing binaries > > > I had a look > > The documentation is *very* lacking. > > sava

Re: executing binaries

2002-07-17 Thread Tanton Gibbs
Chris Knipe wrote: > savage@netsonic:~/src# perl -MIPC::Open2 -e'open2($rd, $wr, "ls -al"); while > (<$rd>) { print; } exit;' > open2: wtr should not be null at -e line 1 It may have to do with the fact that you can't write to ls...the following worked for me use IPC::Open2; use strict; my ($rd

Re: executing binaries

2002-07-17 Thread Chris Knipe
riginal Message - From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 9:25 PM Subject: Re: executing binaries > The Perl Cookbook recipie 16.8 says > use the standard IPC::O

Re: executing binaries

2002-07-17 Thread Chris Knipe
; <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 9:25 PM Subject: Re: executing binaries > The Perl Cookbook recipie 16.8 says > use the standard IPC::Open2 module: > > use IPC::Open2; > > open2(*README, *WRITEME, $program); > print WRITEME "Here's your input\

Re: executing binaries

2002-07-17 Thread Tanton Gibbs
uffers input or output. You should probably perldoc IPC::Open2 for all of the details. - Original Message - From: "Chris Knipe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 3:09 PM Subject: executing binaries > Lo all, > > What&#

executing binaries

2002-07-17 Thread Chris Knipe
Lo all, What's the best way to execute a binary command from within perl, and read text returned by the binary, as well as write data to certain prompts that the program may have? Say, I have... #>./myprogram This is my program, I will ask you a question now Please give me your name: WHATEVER