while (<IFILE>) { chomp; if ($_ =~ /sequence/){ @headerseq = split('\n',$_);
You don't show where you have set $/ to some kind of record seperator so you are reading in one line at a time. That means split('\n',$_) will return one element, the whole line. Each time you are setting @headerseq to the line that matches /sequence/.
The same applies to the other arrays. You are not actually using them as arrays since they only ever hold one element in this setup.
In reply to Re: How to match the sequences with headers
by Lotus1
in thread How to match the sequences with headers
by anonym
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |