in reply to How to avoid using array in concatenating string of multiple lines OR How To Read FASTA
As usual there are lot of ways to do the same in perluse strict; open(DATA,"< c:\\temp.txt") || die "Sorry"; print grep (!/^>/,<DATA>);
use strict; open(DATA,"< c:\\temp.txt") || die "Sorry"; while(<DATA>){ if ($_=~s/(^>\s+)//){ print "\n"; } else { chomp; print; } }
|
|---|