my $stderr; close STDERR; open STDERR, '+<', \$stderr or die $!; [download]
In reply to Re: Redirecting STDERR to a variable by The Mad Hatter in thread Redirecting STDERR to a variable by Anonymous Monk