our $OUTPUT = ''; my $fh = IO::Handle->new(); open($fh, '>', \$OUTPUT); # Catch all output Test::More->builder->output($fh); Test::More->builder->failure_output($fh); Test::More->builder->todo_output($fh); ..testcode.. BAIL_OUT(..or other exit...) END { # This is called even after exit(), so I can access the output print STDOUT $OUTPUT; }