exercises of Learning Perl chapter 13