Capture::Tiny is a Perl module that provides a simple, portable way to capture anything sent to STDOUT or STDERR, regardless of whether it comes from Perl, XS code or an external program. Further, output can be captured while being passed through to the original handles.