#### use CGI; use Fcntl qw(:DEFAULT :flock); my $cgi = new CGI; $user_dir = "/tmp/1154632892005"; open(TMP,">","$user_dir/postdata") 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; $size = -s "$user_dir/postdata"; select(undef, undef, undef,0.35); # sleep for 0.2 of a second. $i++; print TMP $LINE; } close (TMP);