You never assign a new value to $header. Try changing the if like this:
if ($line =~ m/^>(.*)$/){ $header = $1;
See perlretut.
In reply to Re: Read FASTA into Hash
by haukex
in thread Read FASTA into Hash
by ic23oluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |