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.


In reply to Re^2: Help with function, count matches and store in hash & retrieve sorted by Marshall
in thread Help with function, count matches and store in hash & retrieve sorted by Pathogenomix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.