use strict; my $count=1; while(<DATA>){ s/\s//g; chomp; /^>/ ? print "\n " . $count++ . ": " : print; } __DATA__ > Seq 1 (two lines) AAAAAAAAAAAAA CCAAAAAAAAAAA > Seq 2 (two lines) AAAAAAAAAAAAA AAAAAAAAAAAAA > Seq 3 (one line) TTTTTTTTTTTTAACTGAAGATTCGC
In reply to Re: How to avoid using array in concatenating string of multiple lines
by si_lence
in thread How to avoid using array in concatenating string of multiple lines OR How To Read FASTA
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |