in reply to gene location

You might find that EMBOSS is a better option than BioPerl for this sort of thing. It is a sequence analysis toolkit. ( https://en.wikipedia.org/wiki/Open_Bioinformatics_Foundation ) You can do system calls on the command line to activate EMBOSS programs. All that can be done from within a Perl program, with variables inserted into the system call. You are less likely to come across errors or bugs. Sometimes you will be able to work instead with simple flat files. There are many different programs that can be called.

Update _____________

The data that you are using looks like it could be generated by hand which means errors or inconsistencies. This makes working with basic flat files all the more important as you can check the results as you go along.