for my $site ( sort { $a <=> $b } keys %{ $matches{ $fasta_id } } ) { ## A last unless @{ $matches{ $fasta_id }{ $site } }; WEEDLOW: for my $low ( @{ $matches{ $fasta_id }{ $site } } ) { my $lowerlimit = $low + 0; my $upperlimit = $span + $lowerlimit; for my $sitekey ( sort { $a <=> $b } keys %{ $matches{ $fasta_id } } ) { ## B