The book ``Programming Perl'' 3rd edition by L.Wall, T. Christiansenand J.Orwant (also known as the ``Camel'' book, named after the camelpicture on the cover of the book). You want to refer to Chapter 8 thattalks about nested subroutines among other things.