You can solve this if you break it into pieces. If you don't at least try it first all you are going to get is a down vote. First break the problem down, what do you need to do? First you need to read in data, so read up on how to do that. Next you need to figure out how to store the data you read in, read up on data structures particularly the hash. Third you need to accept command line commands from the user so your code knows what to print out, read up on GetOptions (the pkg is actually Getopt::Long and the function out of that package is GetOptions) like your assignment suggests. You shouldn't have any problems pieces together this stuff once you know what you need to do. If you have specific questions then post those and the code that you have tried.