#!/usr/bin/perl use strict; use Win32; use Win32::Process; my $ProcessObj; my $perl_command = ''; print "Starting thread logging test\n"; $perl_command = "$ENV{comspec} /c C:\\perl\\bin\\perl.exe C:\\output_test.pl >MyLog.txt 2>&1"; print "\n$perl_command\n"; my $result = Win32::Process::Create($ProcessObj,$ENV{comspec},$perl_command,1,CREATE_NO_WINDOW,"."); if ($result == 0) { die "Error: ",Win32::FormatMessage( Win32::GetLastError() ),"\n"; } print "Thread logging test completed\n";