Getting gene and protein synonyms: 1 to many

It through errors, but the statement is working. I just need to work on
the perl loop to get the results