in reply to comparing keys and values in different hashes

my %hash = ( dog => 5, sheep => 10, cat => 3, ); my %hash2 = ( dog => 11, budgie => 1, cat => 4, ); print "$_: ", $hash{$_} * $hash2{$_}, "\n" for grep exists $hash2{$_}, keys %hash; __output__ cat = 12 dog = 55
Be careful not to stringify your numeric values or you could get unexpected results.
HTH

_________
broquaint