CONTENTS
Beginning Perl
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-118-01384-7
ISBN: 978-1-118-22187-7 (ebk)
ISBN: 978-1-118-23563-8 (ebk)
ISBN: 978-1-118-26051-7 (ebk)
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions .
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com . For more information about Wiley products, visit www.wiley.com .
Library of Congress Control Number: 2012944681
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.
This book is dedicated to my wife, Lela, and our daughter, Lilly-Rose.
When I first had the opportunity to write this book, I was going to turn it down because I had a newborn daughter. Lela, however, insisted I write it. She knows how much I love writing and was adamant that she would be supportive while I wrote this book. She has been more than supportive: She has kept me going through a long, painful process. Lela, I love you. And beaucoup. You know what I mean.
CREDITS
Acquisitions Editor
Mary James
Project Editor
Maureen Spears
Technical Editor
chromatic
Production Editor
Christine Mugnolo
Copy Editor
San Dee Phillips
Editorial Manager
Mary Beth Wakefield
Freelancer Editorial Manager
Rosemarie Graham
Associate Director of Marketing
David Mayhew
Marketing Manager
Ashley Zurcher
Business Manager
Amy Knies
Production Manager
Tim Tate
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Neil Edde
Associate Publisher
Jim Minatel
Project Coordinator, Cover
Katie Crocker
Proofreader
James Saturnio, Word One New York
Indexer
Robert Swanson
Cover Designer
Ryan Sneed
Cover Image
RTimages / iStockPhoto
ABOUT THE AUTHOR
CURTIS OVID POE started programming back in 1982 and has been programming Perl almost exclusively for 13 years. He currently sits on the Board of Directors for the Perl Foundation, speaks at conferences in many countries, but is most proud of being a husband and father.
ABOUT THE TECHNICAL EDITOR
CHROMATIC is a prolific writer and developer. He is most recently the author of Modern Perl, from Onyx Neon Press ( http://onyxneon.com/ ).
ACKNOWLEDGMENTS
AS WITH MANY BOOKS, this one would not have been possible without many people helping me along the way. In particular, I want to thank Michael Rasmussen, my secret reviewer who, despite not being one of the official reviewers, nonetheless diligently reviewed every chapter and came back with many helpful comments that made this a far better book.
I also have to thank chromatic, my technical reviewer, who managed to annoy me time and time again by pointing out subtle issues that I should have caught but didnt. Hes a better programmer than I am, damn it.
Mary James and Maureen Spears, my primary contacts at Wiley, Wrox imprint, were a joy to work with and really helped keep my spirits up when this book seemed to drag on far longer than I thought. Their senses of humor and help through the editorial process were invaluable. I also have to thank San Dee, whoever the heck she is. Her name kept popping up through the editorial process and her work catching many issues in this book is much appreciated.
I also need to thank Adrian Howard, var Arnfjr Bjarmason, Alejandro Lopez, Andy Armstrong, Aristotle, Michael Schwern, Ricardo Signes, Sean T Lewis, and Simon Cozens for foolishly agreeing to review a book of this length.
Finally, Id like to thank the people working on the Open Feedback Publishing System at OReilly and for engendering a review community ( http://ofps.oreilly.com/titles/9781118013847/ ) for this book and for all the helpful comments this site generated.
There are far too many to name and I apologize in advance for not mentioning all of you here.
On a personal note, I have to say that many times Ive read the comment and all errors are mine and Ive thought, But thats what reviewers are for, right? The reality is far different. When you write a book, the reviewers will catch a huge number of issues, as mine did, but they cant catch all of them. I now realize that in a work of this scope, I have to take responsibility for any flaws. The reviewers are generally not paid for this work and theyre not going to sit there, hours every night, months on end, worrying over every paragraph as I did. They caught most issues, but the remaining flaws in this work are mine and mine alone. Mea Culpa.