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 $_;