Basically what Perl is telling you is that there is data missing where you expect there to be some. Tracing down the code is one way to find out which bit of data it is, but a first step would be to dump the instance of the hash that you do have, using Data::Dumper right before the line that the warning refers to. This should show you which record in your dataset has the missing data, and by examining the record you'll see the problem. Then you can decide whether to ignore the warning or add code to handle the situation.

Add to the top of your script:

use Data::Dumper; $Data::Dumper::Sortkeys = 1;
Then add right before the line that produces the error (should be line 194 after the change above):
my ($cnt00, $cnt01, $cnt10, $cnt11) = (0) x 4; # add two lines print Dumper $data; die "missing \$nchar\n" if not $nchar; my ($first_site, $last_site) = $use_filtered ? @{$thresholds->{$dye}{' +indices'}} : (0, $nchar-1);
This will print the data structure for each record and then die when you encounter the missing information, so you can compare the most recent record with the ones before it that didn't cause a warning message.

Hope this helps!

PS Please edit your OP and use the readmore tags!

Update: Added Dumper code example

The way forward always starts with a minimal test.

In reply to Re: Help De-bugging by 1nickt
in thread Help De-bugging by GeneGeek

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.