Help for this page

Select Code to Download


  1. or download this
    my @diff = grep { !exists $old_gp{$_} } keys %new_gp;
    push @diff, grep { !exists $new_gp{$_} } keys %old_gp;
    
  2. or download this
    my (%foo, %bar);
    # Populate %foo and %bar
    ...
       if (exists $bar{$_} && $bar{$_} eq $foo{$_}) { $_ }
       else { () }
    } keys %foo;
    
  3. or download this
    my (@only_in_foo, @kv_different, @kv_equal);
    foreach (keys %foo) {
    ...
       }
    }
    my @only_in_bar = grep { ! exists $foo{$_} } keys %bar;