title: Perl array element comparing
body: <p>I am new in Perl programming. I am trying to compare the two arrays each element. So here is my code:</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  use v5.10.1;
  
  my @x = ("tom","john","michell");
  my @y = ("tom","john","michell","robert","ricky");
  if (@x ~~ @y)
  {
      say "elements matched"; 
  }
  else 
  { 
      say "no elements matched";
  }
  </code></pre>
  
  <p>When I run this I get the output 
  <code>no elements matched</code></p>
  
  <p>So I want to compare both array elements in deep and the element do not matches, those elements I want to store it in a new array. As I can now compare the only matched elements but I can't store it in a new array.</p>
  
  <p>How can I store those unmatched elements in a new array?</p>
  
  <p>Please someone can help me and advice.</p>