use IO::Wrap; my $stdout = wraphandle(\*STDOUT);