in reply to File handle problems

Right. Apologies for answering this again, but I've reread the priginal post, and what I think you actually want is:
my ($gene_id, @alternative_ids) = split; All the rest is just confusing. This replaces from your  if ($_ =~ match down to your  if ($9 ... line.

I hope that's helped this time.

Jasper - sure no one is listening anymore.