title: How do I access paths with spaces in them in Perl on Windows?
body: <p>I'm converting a Unix Perl script to run on Windows. I'm having a problem with paths that have spaces in them:</p>
  
  <pre><code>open (IN, "| C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin\\mysql.exe -u root -ppwd") or die "$!";
  </code></pre>
  
  <p>The code above throws the following error:</p>
  
  <p><code>'C:\Program' is not recognized as an internal or external command,</code></p>
  
  <p>I tried wrapping in escaped <code>\"</code> like this:</p>
  
  <pre><code>open (IN, "| \"C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin\\mysql.exe -u root -ppwd\"") or die "$!";
  </code></pre>
  
  <p>But no joy. How do I handle paths with spaces?</p>
  
  <p>I'm using ActiveState v5.10.0 built for MSWin32-x86-multi-thread.</p>