title: How do I start a Windows program with spaces in the path from Perl?
body: <p>If I do:</p>
  
  <pre><code>my program = "C:\\MyPath\\MyProg.exe";
  system(("start", $program));
  </code></pre>
  
  <p>MyProg starts up just fine and my script resumes after the system() command.  But if there are spaces in the path like</p>
  
  <pre><code>my program = "C:\\My Path\\MyProg.exe";
  system(("start", $program));
  </code></pre>
  
  <p>It seems to run cmd, not MyProg.</p>
  
  <p>I've tried quoting with things like:</p>
  
  <pre><code>my program = "C:\\My Path\\MyProg.exe";
  system(("start", '"' . $program . '"'));
  </code></pre>
  
  <p>But nothing seems to help.</p>
  
  <p>Of course I can get around it with fork() but I'd like to understand why I can't pass a path with spaces as an argument.</p>