in reply to called too early to check prototype
Try putting:
sub check_gene($); sub check_gene_seq($); sub extractseq($); [download]
at the top. Or you could just move the sub's above your main code.