Re: Comparing Perl Hashes

2011-12-24 Thread Shlomi Fish
Hi Pradeep, On Fri, 23 Dec 2011 00:11:22 -0800 (PST) Pradeep Patra wrote: > Hi all, >I have a questions of comparing two hashes. > > %hash1={a=>2,b=>3,c=>4,d=>5} > %hash2={a=>7,b=>8,c=>9,d=>0) > This is the wrong way of initialising hash variables. You're assigning hash references to hash

Comparing Perl Hashes

2011-12-24 Thread Pradeep Patra
Hi all, I have a questions of comparing two hashes. %hash1={a=>2,b=>3,c=>4,d=>5} %hash2={a=>7,b=>8,c=>9,d=>0) I have to ensure that from %hash2 the value is increased by 5(2->7 and 3->8) for "a","b". I dont want to compare the all the values of hash2(for exp-d=0).I want to push this to a libra