exercises of Learning Perl chapter 14,15