sunil1724 has asked for the wisdom of the Perl Monks concerning the following question:
i have 2 compares the 2 hashes their values.If they are not equal i ahve to keep in one separate hash3. from the result hash i need to find out only values for specific keys in array.Can you please help me on this. suppose if the result hash is my %hash1 = ( 'key1' => '7', 'another_key' => '2', 'the third' => '8',); my %hash2 = ( 'key1' => '7', 'another_key' => '2', 'the third' => "10",); so %hash3 should be like this after comparing these 2 hashes. my %hash3 = ( 'key1' => '7', 'another_key' => '2', ); i have another array below like this @array={key1', 'data2'}; so finally it should print the only value o/p---key1 and 7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to compares 2 hashes and keep it in 3rd hash after that seggregate from array
by pme (Monsignor) on Feb 08, 2015 at 11:35 UTC |