in reply to Re: Help with function, count matches and store in hash & retrieve sorted
in thread Help with function, count matches and store in hash & retrieve sorted

Ok, what would be the most helpful is just the data structures that are used in the call to match_query($indexfile,$queryseq); and which re-produce the problem.

I guess?:

my $indexfile = { 'GCTCAGGA' => '4', 'AGCGTAGC' => '5', 'TTCTGCCT' => '3', 'CATGCCTA' => '6', 'TCGCCTTA' => '1', 'GTAGAGAG' => '7', 'GCGTAAGA' => '13', 'TAGATCGC' => '9', 'CTAGTACG' => '2', 'CTAAGCCT' => '16', 'CTCTCTAT' => '10', 'ACTGCATA' => '14', 'AGAGTAGA' => '12', 'TATCCTCT' => '11', 'AAGGAGTA' => '15', 'CCTCTCTG' => '8' };
What is the $queryseq that goes with that table?
What the heck does: "along with input files that are added as I iterate over a while loop" mean?

You are asking a question about an error that you are getting in a subroutine. In the best case, you provide a complete set of runnable code. All we have to do is download and hit the "run" button to replicate exactly your problem.

What we have now is kind of like a UFO report. If the problem can be reproduced (seen) by all, then there will be solutions forthcoming. Your job is to boil this down to a single set of inputs that "demo's the problem". If the $indexfile structure above doesn't need 16 entries to demo the problem, then use fewer entries. Sometimes submitting an excellent "bug" report requires a lot of work to get the situation down to a minimal, easily replicate-able situation. I have certainly spent entire work weeks doing that for complex issues.