in reply to I don't understand error message

You should read the manual of Bio::SearchIO. It says:
Reads the next ResultI object from the stream and returns it. Certain driver modules may encounter entries in the stream that are either misformatted or that use syntax not yet understood by the driver. If such an incident is recoverable, e.g., by dismissing a feature of a feature table or some other non-mandatory part of an entry, the driver will issue a warning. In the case of a non-recoverable situation an exception will be thrown.
If this function returns undef, it is likely (although the manual is silent about it) to indicate an "End-Of-File" or "End-of-Stream" situation rather than an error as errors will throw an exception.

It is a common idiom to wrap methods such as object->next_SOMETHING in a while-loop to automatically run through all results and finish when there are no more "next" things to process.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: I don't understand error message
by lomSpace (Scribe) on Jun 16, 2009 at 20:50 UTC
    I have read the manual, and this is not so clear to me. So, my problem may be solved with while loops? I'll attempt that.

    Thanks!
      So, my problem may be solved with while loops?
      If you are interested in looping through all "next" results, that would be a good start.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        I should not have to use a loop. I have tested the program locally and it works. When I use it as a subroutine in a larger program is when I run into trouble. I have checked and it is reading in the file. Any ideas?