in reply to map question
This code reminds me a lot of the exercises in the "Learning Perl Objects, References and Modules" book :)
That book was instrumental of me finally really grasping references in Perl so many years ago.