use Win32::OLE; my $wc = Win32::OLE->new('WrapConsole') or die "oops\n"; $wc->WriteLine( 'this is a test, should have a new line'); $wc->Write( 'this should not have a new line '); $wc->Write( "This should follow immediately, with a new line\n");