open(TMP,">","$post_data_file") or &bye_bye ("can't open temp file"); my $i=0; $ofh = select(TMP); $| = 1; select ($ofh); while (read (STDIN ,$LINE, 4096) && $bRead < $len ) { $bRead += length $LINE; select(undef, undef, undef,0.35); # sleep for 0.35 of a second. # Many thanx to Patrick Knoell who came up with the optimized value for # the duration of the sleep $i++; print TMP $LINE; } close (TMP);