in reply to Re^2: I don't understand error message
in thread I don't understand error message
You say there is one result, but the evidence (an undef being returned) indicates that there is not.
If my $result=$in->next_result; is putting undef into $result there must be a reason for it. The key is figuring out what that could be.
Since $in is a new Bio::SearchIO(...), you should look at that documentation to find the conditions under which next_result will be undef.
I could guess and suggest that perhaps your file is empty, does not exist, does not have permission for you to view it, or even contains data in the wrong format.
PS:
Out of curiosity, why are you prepending ">" to the filename you are passing in? It seems unlikely that that would result in a valid file name.