Help for this page
my $inv = {}; for my $index (keys %$rc) { ... push @{ $inv->{$sorted[0]} }, $index; } }
return (@{ $inv{$id2} } == 1) ? 1 : 0;