popen(3) is indeed available in Perl. It's just spelled o-p-e-n.
Your standard open with a vertical bar at the beginning or the end maps to popen, effectively. And as I recall, the standard popen(3) was also
one way or the other, and not both ways as you wanted.
So you wanted something beyond popen that does bidirectional opens.
And the other messages in this thread are describing them to you, so I won't
repeat that.
-- Randal L. Schwartz, Perl hacker | [reply] |
Um, yeah, naturally after pressing the <submit> button I realised that what I really wanted to use was socketpair(), fork() and exec(), and now I'm romping away.
Jim the Embarrassed
| [reply] [d/l] [select] |
I'd use the Expect module. Only because if you're interacting with this external process, there's lots of nitpicky details that Expect will take care of for you. This frees you to think about the conversation and not worry too much about buffering, deadlock, ptys, etc..
| [reply] |