Leanpub Header

Skip to main content

Data Munging With Perl [2ed]

Techniques for data recognition, parsing, transformation and filtering

Data Munging With Perl [2ed]
This book is 100% completeLast updated on 2026-11-21
+25% in the last 90 days

Minimum price

$12.99

$17.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

Data Munging with Perl is back. After 25 years.

The second edition of the classic guide to wrangling messy data with Perl, fully updated for modern Perl and modern data.

A lot has changed since this book was first published in 2001. We don't munge the same data we did then, and we don't use the same tools. This second edition brings the book completely up to date for modern Perl and modern data.

  • Modern Perl: updated throughout to use the features added to Perl over the last 25 years, including Unicode, signatures and postfix dereferencing.
  • Modern tools: today's CPAN ecosystem, not the modules we relied on in 2001.
  • Modern data: less XML, much more JSON and YAML, alongside CSV, HTML, databases, fixed-width and binary formats, and a chapter on writing your own parsers.

Every example has been run and checked against current Perl, from 5.36 to 5.44. Whatever shape your data arrives in, this book shows you how to turn it into something useful.

Inside the book

  • The idioms and practices that make data munging programs short, safe and easy to maintain
  • Pattern matching: regular expressions for real-world data
  • Record-oriented, fixed-width and binary data, including text encodings
  • Parsing HTML, and the common interchange formats: CSV, JSON, YAML and XML
  • Building your own parsers when no ready-made module fits
  • A modules reference and a refresher on essential Perl

All the example code is free to download from the book's page on perlschool.com.

Share this book

Featured in our articles on

Author

About the Author

Dave Cross

Dave Cross has been programming professionally since 1988 and using Perl since 1996. In that time he has used Perl as a glue language, for web development and as a general-purpose programming language. He is the author of Data Munging with Perl (Manning, 2001) and a co-author of Perl Template Toolkit (O’Reilly, 2003). He has also written articles about Perl for The Perl Journal and Linux Format.

Dave has run training courses on Perl since 2001. He has run in-house courses for companies ranging from investment banks to dotcoms and he regularly runs public courses in London. He is often invited to give training courses alongside open source conferences like the UKUUG Spring Conference and the London Perl Workshop. He is a regular speaker at both Perl and open source conferences.

Dave has been heavily involved in the Perl community for many years. In 1998, he founded the London Perl Mongers, the first Perl Users’ Group in Europe and he lead the group for its first four years. He then became the International User Groups Co-ordinator for the Perl Foundation. In 2004 he was awarded a White Camel award for his services to the Perl community.

Dave owns and runs Magnum Solutions, an open source development consultancy based in London. The rumours about the gold-plated cats were never true.

Also by the Author

Also by the Author

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub