|
Data Munging with Perl David Cross 2001 | 304 pages ISBN: 1930110006 |
|||
![]() |
$36.95 | Softbound print book | |
![]() |
$18.50 | PDF ebook | |
Errata
Errata for Data Munging with Perl are placed below.
If you find any errors in the book, feel free to notify the author by taking part in our Author Online Forum.
Page 21 (bottom code example):
push @{$year{$year}}, $rec;
should be
push @{$years{$year}}, $rec;
Page 46 (second code example):
my @sorted @IPs
should be
my @sorted_IPs
Page 47 (third para):
Uri Guttman and Larry Rosler's paper can now be found at:
http://www.sysarch.com/perl/sort_paper.html
Page 68:
multiple line mode
should be
single line mode
and
Also ^ and $
should be
In multiple line mode, $ and $
Pages 68-70:
There's no way to really incorporate this correction without a
lot of
rewriting, but just to clarify what I say on these pages:
The /o modifier can be used with both m// and s///. When used
with s///,
it only works on the search pattern, _not_ on the replacement
pattern.
Page 74 code example:
@rec{@fields) = split(/:/);
should be
@rec{@fields} = split(/:/);
and
$users{$rec->{name}} = \%rec;
should be
$users{$rec{name}} = \%rec;
Page 90 last code example:
while ($data =~ /$num_re/g) {
should be
while ($data =~ /($num_re)/g) {
Page 105 first paragraph:
we stored this value in $file
should be
we stored this value in $old
Page 112 code example:
$/ = "\n%%\n";
should be
$/ = "%%\n";
Page 141 first text para:
Operating systems, such as UNIX, don't make
should be
UNIX, like most operating systems, doesn't make
Page 166 Sample HTML file:
<li>Item two</li></ul>
should be
<li>Item two</li></ol>
Page 173 code example:
$p->get_tag('table') !! die ...
should be
$p->get_tag('table') || die ...
Page 182 code example:
'TEMPERATURE', [ ( 'DEGREES'
should be
'TEMPERATURE', [ { 'DEGREES'
This error occurs twice.
Page 183 Fig 10.1:
In the column with three smaller rectangles, the last number in
the right
hand column of the bottom rectangle (i.e. the minimum temperature)
should
be 6 not 12.
Page 218 last code example:
footer: /\d+/ 'CDs'
should be
footer: /\d+/ 'Records'
Page 234 first bullet point:
The last sentance, "Full instructions ... perldoc
perlmodinstall"
should be
moved to the end of the first para on page 233.
Page 235 $dbh->prepare bullet poiny:
Final "prepare" should be in code font.
Page 239 MON_THOUSANDS_SEP bullet poiny:
"format_price" should be in code font.
Page 239 INT_CURR_SYMBOL bullet point:
USD .
should be
USD.
Page 240 format_bytes bullet point:
1024 and he value
should be
1024 and the value
Page 242 last bullet point:
"two weeks" on Friday
should be
"two weeks on Friday"
Page 245 $parser->eof bullet point:
the parser the
should be
the parser that
Page 252 ExternEnt table entry:
Remove period (.) from end of all lines in the final cell.
Page 253 last table cell:
indication
should be
indicating
Page 260 third code example:
while ( ($type, $count) = each %rings) ) {
should be
while ( ($type, $count) = each %rings) {
Page 260 final code example:
called %minor rings
should be
called %minor_rings
Page 265 first while loop code example:
statements
should be
statements;
Page 266 second code example:
$_; = <STDIN>;
should be
$_ = <STDIN>;
and
redo unless $_'
should be
redo unless $_;
DESCRIPTION
Your desktop dictionary may not include it, but 'munging' is a common term in the programmer’s world. Many computing tasks require taking data from one computer system, manipulating it in some way, and passing it to another. Munging can mean manipulating raw data to achieve a final form. It can mean parsing or filtering data, or the many steps required for data recognition. Or it can be something as simple as converting hours worked plus pay rates into a salary cheque.
This book shows you how to process data productively with Perl. It discusses general munging techniques and how to think about data munging problems. You will learn how to decouple the various stages of munging programs, how to design data structures, how to emulate the Unix filter model, etc. If you need to work with complex data formats it will teach you how to do that and also how to build your own tools to process these formats. The book includes detailed techniques for processing HTML and XML. And, it shows you how to build your own parsers to process data of arbitrary complexity.
If you are a programmer who munges data, this book will save you time. It will teach you systematic and powerful techniques using Perl. If you are not a Perl programmer, this book may just convince you to add Perl to your repertoire.
What’s inside:
- Using CPAN modules like Number::Format, Date::Manip, Text::CSV_XS
- Making your code concise using Perl’s special variables (like $/, $” and $_)
- Building data parsers using Parse::RecDescent
- Processing of HTML and XML
Translation rights for Data Munging with Perl have been granted for Japan, Brazil, and Germany. If you are interested in learning where to buy this book in a language other than English, please inquire at your local bookseller.
WHAT THE EXPERTS SAY ABOUT THIS BOOK...
"I found the sample problems and the author's solutions to be very well done. I especially liked the design tips..."
--Pikes Peak Perl Mongers
"well worth the price, and a good starting point for more advanced forays."
--Use.Perl.com
"...a very good resource for programmers who want to learn more about data parsing, data filters, and data conversion..."
--ACM Computing Reviews
ABOUT THE AUTHOR...
Dave Cross is the owner and Managing Director of Magnum Solutions Ltd., an internet and database consultancy based in London. He has 12 years' experience working in the IT industry. He is an active member of the Perl community, the founder of the London Perl Mongers, and is also a regular columist for Perlmonth, the online Perl magazine.

