Exercise: color selector
Given a list of colors (Blue, Yellow, Brown, White) create a script that will display a menu and ask the user to select one of the colors: For example an interaction would look like this:
$ perl color_selector.pl Please select a number: 0) Blue 1) Yellow 2) Brown 3) White 2 The selected color is Brown
or like this:
$ perl color_selector.pl Please select a number: 0) Blue 1) Yellow 2) Brown 3) White 7 Bad selection
Tools
Solutions

Published on 2015-10-22
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post