Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: pipes question

by quester (Vicar)
on Jan 08, 2013 at 08:55 UTC ( #1012193=note: print w/replies, xml ) Need Help??


in reply to pipes question

Pipes aren't quite flexible enough to do that sort of two-way communication with the spawned process. There are two ways that I know of offhand that will work: one is IPC::Open3 and the other is Expect.pm.

Open3 is conceptually like having pipes to both input and output (and stderr). Expect is closer in spirit to logging in as an interactive user; it gives you the ability to script a two-way conversation with the spawned process. Either one is going to take quite a bit of reading and trying test cases to digest and understand.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012193]
help
Chatterbox?
[LanX]:  last hour of cb doesn't break
[LanX]: 12345678901234- 123456789012345678 901234567890123456 789012345678901234 567890123456789012 345678901234567890 123456789012345678 901234567890123456 789012345678901234 567890123456789012 345678901234567890 123456789012345678 901234567890123456 789012345678901234 567890

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-07-24 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (351 votes). Check out past polls.