Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I know that you can interactively add input to a process via open(P,"|a"); or interactively parse output via open(P,"a|");. I gather that in order to have both input and output be interactive, I would have to switch to sockets. The sockets instructions read like a stereo manual - would someone be so generous as to provide a minimal code snippet for the equivalent of a hypothetical open(P,"|a|")?

Replies are listed 'Best First'.
Re: piping in & out?
by premchai21 (Curate) on Apr 17, 2001 at 21:40 UTC
Re: piping in & out?
by Trinary (Pilgrim) on Apr 17, 2001 at 21:35 UTC
    No idea of the specifics of what you're doing, but it's entirely possible that Expect might work better for you than open with pipe, or socket, or named pipe, etc. Check it out. =)