Thanks for writing us about this. From the book's introduction:
P.2. Code Examples
This book is here to help you get your job done. You are invited to copy the code in the book and adapt it for your own needs. Rather than copying by hand, however, we encourage you to download the code from http://www.learning-perl.com.
The downloads page on learning-perl.com gives this link to download a zip file of all of the examples: https://github.com/downloads/briandfoy/Learning-Perl-Sample-Files/Learning_Perl_sample_files.zip
We'll add a link to the book's product page to make this easier to find.