baldywilson has asked for the wisdom of the Perl Monks concerning the following question:
x=`sql $pwd <<endl | grep (rest of command) select 'something'; exit; endl`As far as I can tell, this sends the "select" and "exit" commands as the standard input to the spawned sql process. Try as I might, though, I can't see how to do something similar in Perl! Put simply, I need to find a way to send a text string as the standard input to a spawned process, and read back the text generated by the process. Any help gratefully received!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use text string as stdin for system process
by jettero (Monsignor) on Jan 05, 2007 at 15:55 UTC | |
by baldywilson (Initiate) on Jan 05, 2007 at 16:00 UTC | |
by derby (Abbot) on Jan 05, 2007 at 16:18 UTC | |
by baldywilson (Initiate) on Jan 05, 2007 at 16:33 UTC | |
by quester (Vicar) on Jan 05, 2007 at 23:14 UTC | |
|
Re: Use text string as stdin for system process
by kyle (Abbot) on Jan 05, 2007 at 15:56 UTC |