in reply to Self-Looping over hash - how to remove duplicate
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Self-Looping over hash - how to remove duplicate
by Jasper (Chaplain) on Oct 05, 2004 at 09:20 UTC |