Chapter 4 Exercises -axp

didn't think of using foreach in that way. Trust perl...