Re: re-launch piped external program
- From: xhoster@xxxxxxxxx
- Date: 24 Sep 2007 19:06:31 GMT
rihad <rihad@xxxxxxx> wrote:
How can I *easily* run an external program, writing commands to it on
a filehandle, and reading its replies from another?
That is kind of like asking "How can I easily solve the 3 body problem
of classical gravitational mechanics". You can't, in general. In this
case, that is because it depends on the details of how the external command
does its buffering, and whether it produces anything on stderr, and other
things. If all ducks line up in a row properly, then it might be easy, but
unless you know what "properly" means, which itself is not easy, then you
won't know if it is easy or not.
Ironically,
reading Perl FAQ [*] left one question unanswered: where's chat2.pl so
much talked about?
http://search.cpan.org/src/ANDYD/perl5.003_07/lib/chat2.pl
I'm asking someone to give a modern (v5.8.8)
example.
Since the v5.8.8 doesn't talk about chat2, you shouldn't expect
to find a 5.8.8 example of chat2.pl.
[*] http://www.faqs.org/faqs/perl-faq/part5/
That is very very old FAQ.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.
- References:
- re-launch piped external program
- From: rihad
- Re: re-launch piped external program
- From: Ben Morrow
- Re: re-launch piped external program
- From: rihad
- Re: re-launch piped external program
- From: Peter Scott
- Re: re-launch piped external program
- From: rihad
- Re: re-launch piped external program
- From: rihad
- re-launch piped external program
- Prev by Date: FAQ 4.25 How do I expand tabs in a string?
- Next by Date: import fails if package namespace != module path
- Previous by thread: Re: re-launch piped external program
- Next by thread: Re: re-launch piped external program
- Index(es):
Relevant Pages
|