open FH, "whois x.x.x.x 2>&1 |"; my $ofh =select(FH); $|=1; select($ofh); #changed while () { print; } close FH;