Hi groups,

I have a file which contain many many of this line (Fasta Format):

YNL331C
CAATATGCGAGGGACCTACATGTTGA
CATGACAATGAATTCTATTGAAAAAA

YKL071W
ATAATTATTCCTGTTTCTTTAACCTG
GTAAAAAAAAGTACAAACACTTAAGC

What I would like to do is to concatenate the line below >
into one single string.
Such as the output would be:

CAATATGCGAGGGACCTACATGTTGAGCATGACAATGAATTCTATTGAAAAA
ATAATTATTCCTGTTTCTTTAACCTGGTAAAAAAAAGTACAAACACTTAAGC

The current code I created now seem to work but doesn't
gie the result I want. Since it concatenates all into 1 single line.
I thought there must be a very simple way to do this.
But I can't seem to figure out how to achieve that.

Your advice is very much appreciated.
Thanks so much for your time.

--
Regards,
Edward WIJAYA
SINGAPORE

#---My Code --------------
while (<>) {
    if (/^>/) {
        next;
    }
    chomp;
    $line .= $_;
}
push (@crseq, $line);
print join("\n", @crseq), "\n";


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to