title: Get Common Hash Ref in Perl
body: <p>I have a hash like this. </p>
  
  <pre><code>my $records = {
  'Name' =&gt; [
  { A =&gt; 101},
  { B =&gt; 102},
  { B =&gt; 102},
  { C =&gt; 104},
  { C =&gt; 104},
  ],
  };
  </code></pre>
  
  <p>Now i want to get the the hash refs that are repeated like B => 102 is repeated i  want to get that rest i want to leave .</p>
  
  <p>I want to get all the hash ref that are repeated.
  In the final response .</p>
  
  <p>Response out i want is like this :</p>
  
  <pre><code>$records = {
  'Name' =&gt; [
  { B =&gt; 102},
  { C =&gt; 104},
  ],
  };
  </code></pre>