in reply to Uninitalised Values - What does it mean?

When you open a file the way he is, do you need to use a redirect?
unless (open (BLAST, "<result.fasta")){ print "Can not open data file \n"; exit; }
I prefer opening files this way:
open BLAST, "<result.fasta" or die "Can not open data file: $!\n";
You may try adding a print statement in the foreach loop to print $record to make sure it has the data you want in it.

Replies are listed 'Best First'.
Re: Uninitalised Values - What does it mean?
by Abigail-II (Bishop) on Jun 19, 2002 at 17:53 UTC
    There are many ways to deal with open failures. Yours is more common than his, but that doesn't make one better than the other. Your messages appear on STDERR, his on STDOUT. You exit with a failure status, he exits successfully.

    Just use whatever works best for you.

    Abigail