Help for this page

Select Code to Download


  1. or download this
    use List::Util qw( sum uniq );
    
    ...
         sum( map  $_->{$k}, @_ ) }
        uniq( map keys(%$_), @_ )
    }
    
  2. or download this
    my %h1 = map { ( $_ => 1 ) } qw( a b c d e f g h );
    my %h2 = map { ( $_ => 1 ) } qw(   b c d e f g h i  );
    ...
    use Data::Dumper;
    $Data::Dumper::Sortkeys=1;
    print Dumper \%summed;