in reply to Search and store solution?

Ask your teacher to explain hashes again; he'll be glad to spend the time on it. (There are some good tutorials on the subject on this site, but I'm too lazy to provide a link for you.)

Learning Perl has a great write-up on regular expressions (and on hashes too, come to think of it). Why don't you write as much as you can of the first four tasks, and show it to us? We'll be happy to give you hints after that.