if ($si == $sn) { $prod = $hash2{$si}; } else { $prod = $hash2{$si}*$hash2{$sn}; } my $tmp = $si; $si = $si <= $sn ? $si : $sn; $sn = $si == $sn ? $tmp : $sn; $spair{"$si-$sn"} = $prod;
In reply to Re: Self-Looping over hash - how to remove duplicate
by Hena
in thread Self-Looping over hash - how to remove duplicate
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |