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

Hi andyBio,

try to change these two lines:

open(my $fh, '<:encoding(UTF-8)', $input); while ($fh) {
as follows:
open my $fh, '<:encoding(UTF-8)', $input or die "Cannot open $inpu +t $!"; while (<$fh>) {
The main change is on the while line (the (<$fh>) part), but checking whether the program could open the file is also essential.

A few more things could be improved, but the above corrections should get you where you want.

Replies are listed 'Best First'.
Re^6: How to format fasta file
by andyBio (Novice) on Apr 12, 2016 at 00:22 UTC
    Thanks a bunch, Laurent R. No more errors! :-)