Help for this page

Select Code to Download


  1. or download this
      for my $key_hash1 (sort {lc($a) cmp lc($b) } keys %{$hash1} ) {
        if( ! exists $hash2->{$key_hash1} ) {
          print "Hash1 contains unit '$key_hash1' but hash2 has no such un
    +it\n";
          next;
        }
    
  2. or download this
      for my $key_hash2 (sort {lc($a) cmp lc($b) } keys %{$hash2} ) {
        if( ! exists $hash1->{$key_hash2} ) {
          print "Hash1 contains unit '$key_hash2' but hash1 has no such un
    +it\n";
        }
      }
    
  3. or download this
        if( $hash1->{$key_hash1} ne $hash2->{$key_hash1} ) {
          print "Both hashes have '$key_hash1' as a unit ",
                "but hash1's value is '$hash1->{$key_hash1}' ",
                "and hash2's value is '$hash2->{$key_hash1}'\n";
        }
    
  4. or download this
      for my $key_hash1 (sort {lc($a) cmp lc($b) } keys %{$hash1} ) {
        if( ! exists $hash2->{$key_hash1} ) {
    ...
          }
        }
      }