Eric <> wrote:
> Hey newsgroup,
>
> first of all, sorry for double-posting but I guess the subject of my
> last post was perhaps not hitting the spot or so... It can be found
> here:
> http://groups.google.de/group/comp.l...thread/thread/
> 4f c35c6fa1a8f488/37ab354f1af7b6e7?hl=de#37ab354f1af7b6e7
You said that pipes didn't work, but you didn't say what the problem
was. You posted code that doesn't run under use strict. And you framed
the whole thing in the context of some other program that I (and
presumably many other people) have never heard of and have little interest
in, rather than in terms of Perl IPC.
>
> The main problem is that while pump()ing a child's output into my $out
> scalar, new output is not fed sequentially, so I always get back the
> entire output the program gave since it started.
Yes, that is what IPC::Run does when it is used in this way. However, it
doesn't seem to care if you screw around with the scalars in the mean time,
so you could try clearing it before calling pump again:
$out='';
(This doesn't seem to be documented in IPC::Run, but I haven't studied that
whole morass carefully.)
But you if you using regex, you probably can't do this exactly, as a
message that spans the buffer would never get found, you have have to clear
only up to the full match, leaving the incomplete nascent message there.
> Any ideas? Please, I really need this stuff. I can't find any examples
> on the net apart from those in perlicp, which aren't explained in
> great detail..
We are not likely to re-write an entire perldoc section based on such
vague complaints. If you have specific questions, please ask. Perhaps
we can explain them to you, as well as improve the docs.
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.