in reply to output caught in memory

Or, if you used IO::File, just do something like:

use IO::File; my $output = IO::File->new(">&STDOUT"); autoflush $out; print $out "Some String\n"; $out->close;