in reply to Redirecting STDOUT
open (STDOUT, ">>myfile.log"); Works just fine for STDERR also!
To redirect into a variable, perhaps you can try@LINES = <STDOUT>; [download]
@LINES = <STDOUT>; [download]