in reply to Redirecting output
select(STDERR); $| = 1; select(STDOUT); $| = 1; [download]
What suggests to you that it might be a buffering problem?