(Perl) capture STDOUT and STDERR from Perl code, subprocesses or XS