Oct 7, 2012, 9:16 PM
Since this is for a course homework assignment, I can't/won't give you the code, but I can/will give you some guidance.
Re: [wyndcrosser] Finding data in arrays
There are several ways to approach this problem, but IMO, the best approach would be to use a dispatch table. A dispatch table is a hash where the keys are the menu options and the value of each of them point to a code reference, (i.e., a reference to a subroutine that is executed when that option is entered).
You need 4 subroutines for the dispatch table. One for each menu option and one "default" to handle invalid input.
After prompting/accepting the user's selection, you sanitize it as needed and compare it against the hash keys and execute the appropriate subroutine.
I'm not going to provide the actual code or reference links, because finding that out is part of your task in completing the assignment.
If/when you get stuck, you can post specific questions along with your code and we will help where we can, without doing your homework for you.
(This post was edited by FishMonger on Oct 7, 2012, 9:22 PM)