#!/usr/bin/perl
use strict;
use warnings;

use Capture::Tiny qw(tee_stdout);

my $stdout = tee_stdout {
    print "moo";
};
