Any help would be greatly appreciated.
We obviously can't answer your exam question for you. If you have specific questions about Perl, we're glad to help, but with such a broad request the most I can offer is a problem solving strategy.
- Make a list of all the data you have at the start. What is the best way to organize that data? Does it belong in a hash? An array? Something more complicated? Not Sure? Make a guess. perldata, perlreftut, perldsc can give you some idea of your options for organizing your data.
- Make a list of all the data you want to have at the end. How does it need to be organized into arrays, hashes, etc in order to print out the results?
- Start brainstorming about how to transform the data you have at the start into the data you need at the end. Try to spell out what you need to do in a list of steps.
- Take a look at your starting data, do you need to change the way you organized it to make those steps easier to carry out?
- Start coding. Keep reviewing your list of steps. Do they still make sense? How do they need to change? Take another look at the way you are organizing your data. Does that still make sense? Does it need to change to make it easier to work with? How?
- When you code, try to think about how you can test your work so far. Does your code do what you think it does? Testing is very easy with Perl. Take a look at Test::Simple and Test::More to see how simple.
- Does the code you've written so far compile? Are you using strict and warnings? I often find cleaning up compilation errors as I go, helps me quickly see problems in my original data structures and plan of action.
Those are just a few ideas to get you started. Best of luck with this exam question.
You might also find this node helpful Perl and Bioinformatics.