in reply to Re: lines written to stdout by a backtick command
in thread lines written to stdout by a backtick command

Yay! I used the open (PIPE,"blah") method and it worked!

I had a feeling it was something to do with the depth and complexity of the piping and stdout reading that was causing it - using this different method must have corrected that.

Thanks sk !

Drew

Replies are listed 'Best First'.
Re^3: lines written to stdout by a backtick command
by tlm (Prior) on Aug 15, 2005 at 08:54 UTC

    Yay! I used the open (PIPE,"blah") method and it worked!

    Seeing what you chose to omit in your shortened rendition of the method, I hope you realize that what matters here is not the name "PIPE" for the handle, but the | at the end of the second argument to open. I.e. it would have worked just as well if you had used

    open( THIS_IS_NOT_A_PIPE,"printsth $arg |" ) or die $!; while ( <THIS_IS_NOT_A_PIPE> ) { print; }
    (With apologies to Magritte.)

    the lowliest monk