in reply to Capturing STDERR to a variable
foobar.pl 2>/path/to/my/stderr.txt [download]
open STDERR, '>', '/path/to/my/stderr.txt'; [download]