See Appendix A, Exercise Answers for answers.
Write a program that reads in a string, then prints that string and its mapped value according to the mapping presented in Table 5.1.
Input
Output
red
apple
green
leaves
blue
ocean
Write a program that reads a series of words with one word per line until end-of-file, then prints a summary of how many times each word was seen. (For extra challenge, sort the words in ascending ASCII order in the output.)
[ Library Home | Perl in a Nutshell | Learning Perl | Learning Perl on Win32 | Programming Perl | Advanced Perl Programming | Perl Cookbook ]