title: How to compare 2 arrays and split in 3 groups?
body: <p>Let's say I have these arrays</p>
  
  <pre><code>my @new = qw/a b c d e/;
  my @old = qw/a b   d e f/;
  </code></pre>
  
  <p>and I would like to them compared, so I get 3 new arrays containing the differences</p>
  
  <ul>
  <li>an array with the elements that are in <code>@new</code> and not in <code>@old</code> : c</li>
  <li>an array with the elements that are not in <code>@new</code> and in <code>@old</code> : f</li>
  <li>an array with the elements that are in both <code>@new</code> and <code>@old</code> : a b d e</li>
  </ul>
  
  <p>I am thinking about the <code>exists</code> function, but that only works for hashes I suppose.</p>
  
  <p><strong>Update</strong>: I messed up the letter examples.</p>