title: Using perl arrays to compare file names to find matching mp3 and m4a file types
body: <p>I've populated an array with all files with the file extension of <code>mp3</code> and a separate array with all <code>m4a</code> files as listed below</p>
  
  <pre><code>my @mp3filesarray = grep ( -f ,&lt;*.mp3&gt;);
  my @m4afilesarray = grep ( -f ,&lt;*.m4a&gt;);
  </code></pre>
  
  <p>What I would like to do is compare the file names of the arrays to see if there is a match or partial match and, if there is, copy both the mp3 file and the m4a file to a new sub directory so that I may review the files to determine which file I want to keep. I am sure that I need to use a regex for this but am not sure how to this. I would appreciate any help with this. Thanks.</p>