title: Escaping wildcard file paths perl
body: <p>I have an array of files:</p>
  
  <pre><code>my @plistFiles = glob('Logs/*/*.plist');
  </code></pre>
  
  <p>which I need to escape, that will contain '(' and ')' as well as the usual spaces.</p>
  
  <p>Here is one of the file paths @plistFiles will return: </p>
  
  <pre><code>Logs/Run 1 (13)/Automation Results.plist
  </code></pre>
  
  <p>I currently have this code for escaping spaces in file paths which I pass to a command in the Terminal in OSX:</p>
  
  <pre><code>$plistFile =~ s/\ /\\\ /g;
  </code></pre>
  
  <p>So how can I edit this regex to also escape ( and )?</p>
  
  <p>Would this be correct just for escaping ( and )?:</p>
  
  <pre><code>$plistFile =~ s/\(\d)/\\\(\d\\\)/g;
  </code></pre>