I need to check for duplicate F ,I based on its inner pairing of G and H (G and H is common for B and D respectively in F and I, (They make a common duplicate pair) The final output count structure is like this:{ 'A' => { 'B' => 'C', 'D' => 'E' }, 'F' => { 'B' => 'G', 'D' => 'H' }, 'I' => { 'B' => 'G', 'D' => 'H' }, 'J' => { 'B' => 'C', 'D' => 'F' }, } }
{ 'B' => { 'C' => 2 ,'G' => 1} # see G's and H's count is + 1 Taking G and H's pair only once. C is 2 because C, E and C,F do +not make a pair, C comes twice and E and F once 'D' => { 'E' => 1, 'H' => 1, 'F'=>1, } # see H's count is 1 }
In reply to Perl hash iteration performance by perlronm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |