# build the list of targets my @targets = map { /^A(\d+)/; $1 } @orthologs; # go through @pids and segregate them into @hits and @potentials my @hits = my @potentials = (); for my $p ( @pids ) { my $itsahit = 0 for my $t ( @targets ) { if ( $p =~ /$t/ ) { push @hits, $t; $itsahit++; last; } } push @potentials, $p unless ( $itsahit ); }
In reply to Re: for loop trouble
by graff
in thread for loop trouble
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |