#!/usr/bin/perl use warnings; use strict; my %hash1 = (a => 12, b => 15); my %hash2 = (a => 30, c => 17); my %merged = %hash1; $merged{$_} += $hash2{$_} for keys %hash2; use Data::Dumper; print Dumper \%merged;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: merge two hashes into one
by choroba
in thread merge two hashes into one
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |