Help for this page

Select Code to Download


  1. or download this
    use Array::Utils qw( intersect );
    my @refkeys1 = grep { ref $ref1->{$_} } keys %$ref1;
    my @refkeys2 = grep { ref $ref2->{$_} } keys %$ref2;
    my @common = intersect( @refkeys1, @refkeys2 );
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    my $output = mergehash($ref1,$ref2);
    print Dumper $output;