I'm guessing you meant to do something like:
| | #!/usr/bin/perl -w
use strict;
open(FH, "table") or die "Can't open file to read!: $!\n";
for my $i (2..682) {
while (<FH>) {
chomp;
my @matrix = split;
my $seed = $matrix[$i];
if ($seed !~ /[ACGTN-]/) {
print "P$i ";
last;
}
}
seek FH, 0, 0;
}
close FH;
|
This code assumes your file is too large to reasonably read into an array; if not, you should do so, instead of reading it over and over 682 times. Even if it is quite large, there are better ways to process it, if efficiency is of any concern.
MeowChow
s aamecha.s a..a\u$&owag.print