Re: re-launch piped external program



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.
.



Relevant Pages

  • Re: re-launch piped external program
    ... How can I *easily* run an external program, writing commands to it on ... a filehandle, and reading its replies from another? ...
    (comp.lang.perl.misc)
  • Re: [SLE] Have you seen this? -- TOFU explained
    ... that I should just accept the difficult method of reading ... replies (by scrolling down and searching for the start of the reply) ... To my logic there is nothing that would speak on behalf of bottom-posting, ... especially when it means more difficult replies to read. ...
    (SuSE)
  • Re: How do I transfer speech profiles to other PCs?
    ... > Post all replies to the group to keep the discussion intact. ... > account will be deleted without reading. ... personal account will be deleted without reading. ...
    (microsoft.public.office.misc)
  • Re: Can I download OLB files from older versions of Office?
    ... > Post all replies to the group to keep the discussion intact. ... > account will be deleted without reading. ... personal account will be deleted without reading. ...
    (microsoft.public.office.misc)
  • Re: filehandle to a member of a zip archive
    ... working for ascii text or .gz files but I cannot figure out how to get ... For the reading interface in particular, you might wat to have a look at ... filehandle that will read the first element from a zip file. ... For writing to zip files, I can't comment on Archive::Zip because I don't ...
    (comp.lang.perl.misc)