in reply to Re: strict refs and REGEXP error
in thread strict refs and REGEXP error
I think the error has something to do with the 'if'-lines not meeting the "... =~ m/NP_/" requirement. I split up the if's in a more simple (but also more inelegant ;-) manner and it works now. From Data::Dumper()-analysis the array and the hash itself are valid.for (my $y = 0; $y < $num; $y++) { for (my $x = $y+1; $x < $num; $x++) { if (($scores->[$y]->[$x] >= 0.96)) { if ($blast_par->{$cleancodes->[$x]}->{"taxon"} eq $blast_par->{$cleancodes->[$y]}->{"taxon"}) { if (($blast_par->{$cleancodes->[$y]}->{"defline"} =~ m/ +refseq/i) && ($blast_par->{$cleancodes->[$x]}->{"defline"} =~ m/ +refseq/i)) { if ($blast_par->{$cleancodes->[$y]}->{"defline"} =~ +m/NP_/) { # this line produces the error $to_keep = $y; $to_kill = $x; } elsif (($blast_par->{$cleancodes->[$y]}->{"defline"} +->[$y] !~ m/NP_/) && ($blast_par->{$cleancodes->[$x]}->{"defline"} +->[$x] =~ m/NP_/)) { $to_keep = $x; $to_kill = $y; } } &generic_sub($to_kill, $to_keep); } } } }
Micha
|
|---|