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 }
In reply to Use of Uninitialized Value- Multiple Errors by hghosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |