in reply to Stop buffering on STDOUT
foreach my $line ( <STDIN> )
foreach reads from a list and then iterates over that list but you are reading from an infinite loop so you never get to the end of the list and it can't start iterating. Change that to a while loop which reads one line at a time:
while ( my $line = <STDIN> )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Stop buffering on STDOUT
by afroncio (Novice) on Nov 01, 2009 at 17:16 UTC |