hghosh has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'm seeing "Use of uninitialized value in numeric eq (==) at line (132 and 136) ." I'm not sure where/what to print in order to debug. I know this error is common, but I haven't found anything helpful while perusing old threads (for example, I've initialized the variables as many other threads have recommended). Feel free to direct me to a helpful, existing thread!
#initiate S for the whole genome #chrboundst = chr start index #chrbound = chr end index my $k=0; my @S=undef; #open OUT, "> temp.0"; my %chrboundst; my %index; # correct? my @fix; my @score; my %chrbound; foreach my $chr (keys %chrsize) { $chrboundst{$chr}=$k; for (my $i=0; $i<=$chrsize{$chr}; $i++) { $index{$k}="$chr\t$i"; $fix[$k]=1 if ($breakpoint{$chr}{$i}==1); # line 132 $score[$k]=$piRNA{$chr}{$i}-$penalty; $S[$k]=$S[$k-1]+$score[$k] if ($i>0); $S[$k]=$score[$k] if ($i==0); $S[$k]=0 if ($S[$k]<0 || $fix[$k]==1); # line 136 $k++; } $chrbound{$chr}=$k-1; # mark the chr end for recalculation }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of Uninitialized Value- Multiple Errors
by holli (Abbot) on May 28, 2019 at 17:36 UTC | |
by hghosh (Acolyte) on May 28, 2019 at 17:49 UTC | |
by holli (Abbot) on May 28, 2019 at 18:24 UTC | |
by poj (Abbot) on May 28, 2019 at 19:00 UTC | |
by BillKSmith (Monsignor) on May 28, 2019 at 18:05 UTC | |
|
Re: Use of Uninitialized Value- Multiple Errors
by NetWallah (Canon) on May 28, 2019 at 17:36 UTC | |
|
Re: Use of Uninitialized Value- Multiple Errors
by BillKSmith (Monsignor) on May 28, 2019 at 18:00 UTC | |
|
Re: Use of Uninitialized Value- Multiple Errors
by Marshall (Canon) on May 28, 2019 at 23:27 UTC |