in reply to Asynchronously capturing output from an external program
open(my $fh_from_child, '-|', 'perl', "$home/filtered.pl")
Keep in mind that the child might buffer its output when it's not connected to a terminal. If the reader hang, it could simply mean the child hasn't emptied its buffer yet. Using a pseudo tty (like Expect does) usually convinces the child not to buffer its output.
Update: Added paragraph about buffering.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Asynchronously capturing output from an external program
by Furple (Novice) on Nov 09, 2010 at 17:55 UTC | |
by ikegami (Patriarch) on Nov 09, 2010 at 21:35 UTC |