in reply to Re^2: How to format fasta file
in thread How to format fasta file

Andy, better change that '<DATA>' into '<STDIN>', then you can either:

Windows:

type fasta.txt | perl laurent_example.pl

Unix:

cat fasta.txt | perl laurent_example.pl

And to get rid of your current error, just add this line after the chomp;

next if($_=~/^\s*$/);