Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: open* and buffered program output

by narse (Pilgrim)
on Feb 20, 2004 at 20:33 UTC ( [id://330654]=note: print w/replies, xml ) Need Help??


in reply to Re: open* and buffered program output
in thread open* and buffered program output

Simply doing $|++ doesn't help me in this case. Nor does setting autoflush(). I suppose I should be using getc() but that does not seem like a very perl way of doing things. I was hoping for something more interesting like setting the end of line delimiter to a regex but I don't see a way of doing this. I wouldn't want to create my own buffer for assembling characters back into strings. Any thoughts?
  • Comment on Re: Re: open* and buffered program output

Replies are listed 'Best First'.
Re: Re: Re: open* and buffered program output
by tilly (Archbishop) on Feb 20, 2004 at 22:58 UTC
    Two possibilities for you.

    One is that the message that you are trying to capture may be sent on STDERR, not STDOUT. If so then you are just listening on the wrong handle.

    The other is that the buffering is not happening in Perl, but in tar. If that is the case, then you could use something like IO::Pty to fool tar into thinking that it is talking to a terminal, and not on a pipeline.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://330654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found