in reply to open (to read) and kill a pipe to a pipe

Why not just close the file handle?
  • Comment on Re: open (to read) and kill a pipe to a pipe

Replies are listed 'Best First'.
Re^2: open (to read) and kill a pipe to a pipe
by ikegami (Patriarch) on Aug 26, 2010 at 22:05 UTC

    Which file handle, the one from which gzip reads that has nothing to do with Perl? Well, you could pipe information to gzip from Perl, so you're back to using open3 or the like. Additionally, you need to feed information to gzip while reading from mycommand, so you need some kind or parallisation. You could sockify the pipes and use select or you could use threads.

    It's getting complicated fast, and it might not even help enough, depending on how long it takes for mycommmand processes a pipe buffer's worth of data.