my $fl=0; for my $k (keys %{$Pos_overlap{$s[5]}) { ++$fl if exists $Pos_overlap{$s[5]}{$k}{$s[2]}; } if ($fl) {