in reply to redirecting output from a format

You need to tie STDERR to a scalar also.

Replies are listed 'Best First'.
Re^2: redirecting output from a format
by mpeters (Chaplain) on Nov 29, 2004 at 21:57 UTC
    I did try that in my initial experimentation, and I revisited it again after your suggestion, but still no dice... after I redirected STDERR to a scalar I ended up with nothing there. I did this:
    my $test_output; my $test_err; tie(*STDOUT, 'IO::Scalar', \$test_output); tie(*STDERR, 'IO::Scalar', \$test_err); eval { runtests(@testfiles); }; $test_output .= $@ if ($@); untie(*STDOUT); untie(*STDERR); $test_output .= $test_err;
    $test_output was no different than it was before. No failed test report.