in reply to How to avoid using array in concatenating string of multiple lines OR How To Read FASTA

Yet another version
si_lence
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
  • Comment on Re: How to avoid using array in concatenating string of multiple lines
  • Download Code