The first header in $line reads through the whole file and then for the second and subsequent headers the filehandle FH will return eof. You need to either open $fn inside the foreach loop or use seek to return the filehandle to the beginning of the file inside the foreach loop.
In reply to Re: While loop printing only one fasta file
by jwkrahn
in thread While loop printing only one fasta header file
by ashnator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |