Hi I have two hashes with different set of keys,but I woul like to sort the two hashes by keys and compare their elements.could anyone tell me how to do this.
I am trying to compare 'raimah' a hash with 'db2hash' I am trying to compare the first sorted element of raimah hash with the first sorted element of db2hash and so on. thank you.naveen sub temp{ my ($db2hash,$raimah)=@_; my $id; my %db2hash1 = %{$db2hash}; for my $ord_id ( keys %db2hash1 ){ print "ord_id :$ord_id \n"; my @temp = keys %{$db2hash1{$ord_id}} ; my $count =@temp ; print "the size of temp is $count\n"; for my $trn_id ( sort keys %{$db2hash1{$ord_id}} ){ print "trn_id : $db2hash1{$ord_id}{$trn_id}\n"; print "$trn_id\n"; } } } --------------------------------- Do you Yahoo!? HotJobs - Search new jobs daily now