title: Running perl script from code Exception
body: <p>I used follow code:</p>
  
  <pre><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();
      }
  </code></pre>
  
  <p>Now I have this exception when I look in perl.MainModule:
  MainModule = 'perl.MainModule' threw an exception of type </p>
  
  <blockquote>
    <p>'System.ComponentModel.Win32Exception' base {System.SystemException} =
    {"Only part of a ReadProcessMemory or WriteProcessMemory request was
    completed"}</p>
  </blockquote>
  
  <p>Target build is x64 due to previous exception in same perl.MainModule when it said cannot run x64 on x32 process (something like that)</p>