Hello,
as your script is running on Linux and Windows, you must check for the system. The following code should do the trick, I am using it. The dos window is showing up but disappear just after.
BEGIN {
if ($^O eq 'MSWin32') {
require Win32::Console;
Win32::Console::Free( );
}
}