title: Comparing the values between two hash of arrays
body: <p>I have two hash of arrays. I want to compare whether the keys in both hash of arrays contain the same values.</p>
  
  <pre><code>#!/usr/bin/perl
  use warnings; use strict;
  my %h1 = (
        w =&gt; ['3','1','2'],
        e =&gt; ['6','2','4'],
        r =&gt; ['8', '1'],
       );
  
  my %h2 = (
        w =&gt; ['1','2','3'],
        e =&gt; ['4','2','6'],
        r =&gt; ['4','1'],
       );
  
  foreach ( sort {$a &lt;=&gt; $b} (keys %h2) ){
      if (join(",", sort @{$h1{$_}})
          eq join(",", sort @{$h1{$_}})) {    
  
          print join(",", sort @{$h1{$_}})."\n";
          print join(",", sort @{$h2{$_}})."\n\n";
      } else{
      print "no match\n"
      }
      }
  
  
  if ("1,8" eq "1,4"){
      print "true\n";
  } else{
      print "false\n";
  }
  </code></pre>
  
  <p>The output is supposed to should be:</p>
  
  <pre><code>2,4,6
  2,4,6
  
  1,2,3
  1,2,3
  
  no match
  false
  </code></pre>
  
  <p>but for some reason my <code>if-statement</code> isn't working. thanks</p>