Looking at the source, the message "<IN> line 8192." is irrelevant if not misleading because IN was never closed as it should. In sub _read_bkgd(). So, all subsequent warns report it and rightly so as it is still open, alas they are irrelevant.

Line 476 of the source file is:

sub _get_seed { my $self = shift; my $n_bkgd_seq = List::Util::sum( @{ $self->{bkgd_ref}->[0] } ); my @hd_sum; for my $oligo_indice ( 0 .. $#{ $self->{oligo_ref} } ) { $hd_sum[$oligo_indice] = List::Util::sum( @{ $self->{hd_matrix_ref}->[$oligo_indice +] } ); # 476 }

Which suggests that there is something wrong with $self->{hd_matrix_ref}->[$oligo_indice]. Either $self->{hd_matrix_ref} is not an arrayref or if it is, the index $oligo_indice exceeds its size, or $self->{hd_matrix_ref}->[$oligo_indice] is not an arrayref. The construction of $self->{hd_matrix_ref} is done in line 325 (sub _build_hd_matrix).

From a glance at line 325, I think the first and second hypotheses can be ruled out because the index spans the exact same range as in line 476, that is:

for my $oligo_indice ( 0 .. $#{ $self->{oligo_ref} } ) {

That is, the array has correct dimensions but may contain "holes" or has undef in its 2D span. (Edit: by "holes" i mean array elements which were never set to a value, as opposed to the "undef" which means array elemets were set to an undef value which was the result of a calculation/transformation which went wrong, and was not detected, or just bad input).

If you want to debug this, then perhaps you can add a couple of debug prints to see what's going on with that array. I would start just before line 387 (before return), with this (untested):

for my $oligo_indice ( 0 .. $#{ $self->{oligo_ref} } ) { print "index: $oligo_indice ("; for my $count_indice ( 0 .. $#{ $self->{count_matrix_ref} } ) { if( ! defined $hd_matrix[$oligo_indice][$count_indice] ){ die "prob +lem at [$oligo_indice][$count_indice]" } print $hd_matrix[$oligo_indice][$count_indice]."," } print "\n"; }

bw, bliako


In reply to Re: Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192. by bliako
in thread Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192. by roarce92

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.