The following code is working sort of fine:
open( PIPE, '-|', 'ant' );
for( <PIPE> ) {
print;
}
However, it doesn't do what I want. Since the Ant build can take 5 minutes, I would like to see the output line by line. Instead, I'm getting the entire input at the end of the process.
Looking at it with the Perl debugger, Perl waits at the 'for' statement, until Ant terminates. Why is that?