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