I used follow code:
static void Main(string[] args)
{
ProcessStartInfo perlStartInfo = new ProcessStartInfo(@"C:\strawberry\perl\bin\perl.exe");
perlStartInfo.Arguments = "c:\\ebm\\parse_ebm_log.pl";
perlStartInfo.UseShellExecute = false;
perlStartInfo.RedirectStandardOutput = true;
perlStartInfo.RedirectStandardError = true;
perlStartInfo.CreateNoWindow = false;
Process perl = new Process();
perl.StartInfo = perlStartInfo;
perl.Start();
perl.WaitForExit();
string output = perl.StandardOutput.ReadToEnd();
}
Now I have this exception when I look in perl.MainModule: MainModule = 'perl.MainModule' threw an exception of type
'System.ComponentModel.Win32Exception' base {System.SystemException} = {"Only part of a ReadProcessMemory or WriteProcessMemory request was completed"}
Target build is x64 due to previous exception in same perl.MainModule when it said cannot run x64 on x32 process (something like that)
C:\strawberry\perl\bin\perl.exe -V:archname(capitalV)