The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
| Version |
Location |
Description |
Submitted By |
Date Submitted |
Date Corrected |
| Printed |
Page viii
There's a typo in the table of contents where an additional space |
appears before 6.4 " Commenting with Regular Expressions".
|
Anonymous |
|
|
| Printed |
Page xxx
first paragraph under "Documentation Conventions" |
"printer pager" should be "printer paper".
|
Anonymous |
|
|
| Printed |
Page xxviii
Knuth's "The Art of Computer Programming" now says 3rd Edition, 1998. |
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 2
In the 3rd paragraph, changed |
0, 0.00, and 0.0000000 are all
to
0., 0.00, and 0.0000000 are all
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 3
|
In the first complete sentence, changed "as with ' here" to read :
"as with / here".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 5
|
The 1st paragraph used to read:
You can use the =~ operator in conjunction with the s///,
m//, or tr//// operators to make them affect only that
portion of the string.
Changed to:
You can use the =~ operator and the s///, m//, or tr////
operators in conjuncton with substr to make them affect only
that portion of the string.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 8
In the 1st paragraph, changed the mention of "Recipe 8.13" |
to "Recipes 13.11 or 14.11".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 9
Changed "perlop" to "perldata" under See Also. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 15
Added the missing quotation mark to "Switches" in the |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 17
The code comment "single quotes!" now reads "like single quotes!". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 18
code example, middle of page |
$$1 has been changed to ${$1} in two instances. The code now reads:
# expand variables in $text, but put an error message in
# if the variable isn't defined
$text =~ s{
$ # find a literal dollar sign
(w+) # find a "word" and store it in $1
}{
no strict 'refs'; # for $$1 below
if (defined ${$1}) {
${$1}; # expand global variables only
} else {
"[NO VARIABLE: $$1]"; # error msg
}
}egx;
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 20
The = sign now lines up with the others in the code example at |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 20
Changed "You can also use them to do" to "You can also use |
their functional forms to do"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 30
The user is correct that the formatting is all askew, and also |
correct in their suggested fix, to wit:
sub trim {
my @out = @_;
for (@out) {
s/^s+//;
s/s+$//;
}
return wantarray ? @out : $out[0];
}
However, I think they somewhat miss the mark on what to do when a list
is passed in while under scalar context. This is an odd situation,
such as you see in
$string = reverse(@list);
So perhaps the same approach should be taken here, amending the
return to
return wantarray ? @out : "@out";
|
Anonymous |
|
|
| Printed |
Page 30
Halfway down, in sub trim: the first 4 lines following |
sub trim { were indented one tab-stop too far. The code now reads:
sub trim {
my @out = @_;
for (@out) {
s/^s+//;
s/s+$//;
}
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 31
Change the parse_csv routine to the following |
# See MRE2, p214
sub parse_csv {
my $text = shift; # record containing comma-separated values
my @fields = ();
while ($text =~ m{
# Either some non-quote/non-comma text:
( [^"',] + )
# ...or...
|
# ...a double-quoted field: (with "" allowed inside)
" # field's opening quote; don't save this
( now a field is either
(?: [^"] # non-quotes or
|
"" # adjacent quote pairs
) * # any number
)
" # field's closing quote; unsaved
}gx)
{
if (defined $1) {
$field = $1;
} else {
($field = $2) =~ s/""/"/g;
}
push @fields, $field;
}
return @fields;
}
|
Anonymous |
|
|
| Printed |
Page 31
Under See Also, changed "trim leading whitespace" to "trim |
leading and trailing whitespace", and deleted "and use it when
we separate list elements in Recipe 4.1"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 31
|
The last code example used to read:
return quoteword(",", 0, $_[0]);
It now reads
return quotewords(",", 0, $_[0]);
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 34
The word "lorrie" was misspelled in the table. Now reads "lorry". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 34
In the paragraph above the code example, changed |
A -t to test for an interactive run check tells whether
to
A -t check to test for an interactive run tells whether
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 37
The prompt at the bottom-most command is now a "%" like |
the rest of them, not a "$".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 37
1st paragraph |
Reference to Recipe 16.14 (installing an output filter) was changed to Recipe
16.5.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 45
In the 1st paragraph, changed "Perl's supports the function" |
to "Perl supports the function"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 50
In the 1st paragraph, changed "use the $x..$y construct" to |
"use the $X .. $Y construct"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 53
Added a semicolon before "Chapter 3" in the See Also section. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 53
Inserted a thinspace after the "y" at the end of "Cryptography" |
and its following semicolon.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 55
In the first code example, |
changed
} while ( $w >= 1 );
to:
while ($w >= 1 || $w == 0)
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 64
Changed "to convert from octal and uses hex" to "to convert from |
octal and hexadecimal", and changed the font on hexadecimal.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 64
In See Also: removed ";sysopen in covered in Recipe 7.1" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 65
Under Solution, changed "ternary hook" to "ternary conditional". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 65
|
The middle line of the last code example used to read:
printf "%d hour%s %s enough.
", $time,
$time==1 ? "" : "s";
$time==1 ? "is" : "are";
It now reads::
printf "%d hour%s %s enough.
", $time,
$time==1 ? "" : "s",
$time==1 ? "is" : "are";
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 67
Changed "huge primes" to "huge integers". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 67
Used to read: |
factors 8 9 96 21
Changed to read:
bigfact 8 9 96 2178
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 68
Also changed "factors" to "bigfact" for the other two examples. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 68
Changed "bignum" in the program text to "bigfact". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 68
Removed the "$root, " from the declaration |
my($n, $root, %factors, $factor);
It now reads:
my($n, %factors, $factor);
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 71
table |
The variable "$month" is actually "$mon."
|
Anonymous |
|
|
| Printed |
Page 71
The URL in the bottom of the footnote is out of date. Changed to |
http://sciastro.astronomy.net/sci.astro.3.FAQ
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 71
table listing the time fuction variables: |
"1-366" now reads "0-365."
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 73
first paragraph |
"YYYY-MM-DD," now reads "YYYY MM DD",
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 75
Changed $TIME to $time |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 77
Changed "Date::DateCalc" to "Date::Calc" throughout page (4 times). |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 78
|
The seconds were wrong in the output. They now read:
There were 265333775 seconds between Nat and Bree
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 79
Changed "number of days difference" to "number of days". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 79
|
The weeks and days were wrong in the output. They now read:
(438 weeks, 4 days, 23:49:35)
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 79
Changed both occurrences of "Bree and Nat" to "Nat and Bree". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 79
Changed "easily calculated from the day of the year" |
to "easily calculated from the day of the year (but
see discussion below, as standards differ)"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 80
Changed the code in the center of this page as follows |
use Date::Calc qw(Day_of_Week Week_Number Day_of_Week_to_Text)
$year = 1981;
$month = 6; # (June)
$day = 16;
$wday = Day_of_Week($year, $month, $day);
print "$month/$day/$year was a ", Day_of_Week_to_Text($wday), "
";
## see comment above
$wnum = Week_Number($year, $month, $day);
print "in week number $wnum.
";
6/16/1981 was a Tuesday
in week number 25.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 80
2nd program block example, first line, missing semicolon |
terminating semicolon missing in example; as shown, recipe will abort.
was:
use Date:Calc qw(Day_of_Week Week_Number Day_of_Week_to_Text)
^
now reads:
use Date:Calc qw(Day_of_Week Week_Number Day_of_Week_to_Text);
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 81
In problem 3.7, added a closing parenthesis to the third line |
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 81
1st code block |
The timelocal function expects months to be in a 0 based format (i.e. 0 =
Jan). In the example given, the date "1998-06-03" is parsed and sent as is to
timelocal(). The month value ("03") should be decremented by 1 before being
passed to timelocal().
now reads:
$epoch_seconds = timelocal(0, 0, 0, $dd, $mm-1, $yyyy-1900);
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 84
Changed "seconds between $t1 and $t2" into |
"seconds between $t0 and $t1" so it matches the code.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 84
|
code now reads:
first chunk:
use Time::HiRes;
$t0 = Time::HiRes::time;
## do your operation here
$t1 = Time::HiRes::time;
$elapsed = $t1 - $t0;
# $elapsed is a floating point value, representing number
# of seconds between $t1 and $t2
second chunk:
use Time::HiRes;
print "Press Return when ready: ";
$before = Time::HiRes::time();
$line = <>;
$elapsed = Time::HiRes::time() - $before;
print "You took $elapsed seconds.
";
Press return when ready:
You took 0.228149 seconds.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 85
In line 2, reading |
syscall(&SYS_gettimeofday, $start, 0)) != -1
Deleted second right parantheses.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 86
Changed "The Time::HiRes provides to "The Time::HiRes module provides" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 94
The header now reads "Discussion" instead of "Description" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 94
Changed |
print "I have @array marbles
.";
into
print "I have @array marbles.
";
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 95
Changed "conditional operator discussed" to "conditional |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 97
In the 5th paragraph, changed "entry for $#array" to |
"discussion of the $#array notation".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 99
Changed |
print "@array";
to
print "@array
";
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 99
Changed |
foreach $item (@a, @b) {
$item *= 7;
print "$item ";
}
to
foreach $item (@a, @b) {
$item *= 7;
}
print "@a @b
";
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 102
Changed "@unique" to "@uniq" in the last line on this page. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 107
In the 3rd paragraph of the Discussion, changed "Unlike the |
initial solution, the elements..." to "The elements..."
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 111
In the 2nd paragraph, deleted the "be" from "isn't be an array" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 114
|
The code used to read :
@MATCHING = ();
foreach (@LIST) {
push (@MATCHING, $_) if TEST ($_)
It now reads:
@matching = ();
foreach (@list) {
push (@matching, $_) if TEST ($_)
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 115
|
The example under Solution used to read:
@Sorted = sort { $a <=> $b } Unsorted;
It now reads:
@sorted = sort { $a <=> $b } @unsorted;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 115
In the 1st paragraph under Discussion, changed "comparison |
routine with..." to "comparison subroutine with..."
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 120
Changed "remove the temporary array" to |
"remove the temporary arrays"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 124
In the 3rd paragraph, 2nd line, changed "longest line seen" |
to "length of longest line seen"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 124
In the 3rd paragraph, 3rd line, changed "by the longest input |
record seen" to "by the length of the longest input record seen"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 125
Near the bottom of the page, indentation of `sub fact...' |
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 126
4th paragraph |
now reads:
You call n2perm with two arguments: the permutation number
to generate (from 0 through factorial(N)-1, where N is the
size of your array) and the subscript of the array's last
element.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 127
Changed "permutation of S objects" to "permutation of $len objects" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 127
Changed Camel:3 to "Chapter 3 of Programming Perl", and |
Camel:2 to "Chapter 2 of Programming Perl".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 130
Changed |
the discussions of closures in the "Private Variales via my()"
section of perlsub(1) and perlref(1)
to
the discussions of closures in perlsub(1) and perlref(1)
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 135
Changed "Use each with while loop:" to "Use each with a while loop:" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 144
Changed |
foreach $food (sort { $food_color{$a} cmp $food_color{$b} } )
keys %food_color) {
print "$food is $food_color{$food}.
";
}
to
foreach $food (sort { $food_color{$a} cmp $food_color{$b} }
keys %food_color)
{
print "$food is $food_color{$food}.
";
}
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 145
In the 1st paragraph under Discussion, changed "we assign it |
to %MERGED," to "we assign it to %merged,"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 145
In the last line on the page, changed "%ingested_colors" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 146
The first $substance_color in this paragraph now lines up |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 148
Deleted "The explanation of hash slices in perldata(1) and" |
under See Also, because this recipe did not discuss them.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 148
In the example under Solution, changed "as the keys to %HASH" |
to "as the keys to %hash"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 151
Changed |
The first foreach adds one to $count{$element} for each
occurrence of $element.
to
The foreach adds one to $count{$element} for every
occurrence of $element.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 151
In the paragraph under Problem, italicized "of" in the |
phrase "the mother of relationship"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 152
Changed |
next unless /^s*#s+includes+<([^>]+)>/;
to
next unless /^s*#s*includes*<([^>]+)>/;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 152
The description of the code sample about #includes |
was wrong. Tracing the second part of the example, it
looked like @include_free would contain a list of files
that contain include statements, but are not themselves
included in any files. So:
This shows which files don't include any others:
Now reads:
This shows which files with include statements are not
included in other files.
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 153
Changed "% du 9781565922433" to "% du pcb" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 154
Changed |
contains "yes" and "no", which do not have
to
contains "yes" and "not", which do not have
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 155
Changed "contains a reference to an anonymous array containing" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 155
Changed |
contains "pcb/rev/yes" and "pcb/rev/no".
to
contains "pcb/rev/yes" and "pcb/rev/not".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 156
Halfway down the page was a line containing nothing but |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 161
|
Perl example at the top now reads:
$ echo longest | perl -ne 'print "$&
" if /(long|longer|longest)+/'
long
And in the Awk example later:
$ echo longest |
awk 'match($0, /(long|longer|longest)+/)
{ print substr($0, RSTART, RLENGTH) } '
longest
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 163
the last sentence in 4th paragraph before the code, the variables are reversed and must be switched. |
$' and $`
should be
$` and $'
(Also, make very certain those are symmetric ticks, not a vertical prime.)
|
Anonymous |
|
|
| Printed |
Page 165
5th paragraph |
In the code before the "See Also" block, the first line now read
($a = $b) =~ s/x/y/g; # copy $b to $a, then change $b
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 166
IN PRINT: "Discussion" section, first paragraph, fourth sentence |
The negated character class [^Wd_] specifies a byte that must not be an alphanumunder, a digit, or an underscore.
Should be:
The negated character class [^Wd_] specifies a byte that must be neither a non-alphanumunder, a digit, nor an underscore.
|
Anonymous |
|
|
| Printed |
Page 172
3rd para |
The correct text now reads:
When you want the last match of arbitrary pattern A, you find A
followed by any number of characters not followed by A.
The general construct is A(?!.*A), which can be broken up
for legibility:
m{
A # find some pattern A
(?! # mustn't be able to find
.* # something
A # and A
)
}x
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 178
In the 3rd line of code, changed "different liens" to "different lines" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 191
At the bottom of the page, changed "Found numeral..." to |
"Found number..." 3 times.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 192
`Even effectively' is now `Even effectively' (2 spaces) |
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 193
Regular expression on last line of page |
/(BEGIN((?:(?!BEGIN).)*)END)/
Should be:
/(BEGIN((?:(?!BEGIN).)*?)END)/
|
Anonymous |
|
|
| Printed |
Page 193
In the 2nd paragraph from the bottom of the page, changed |
and then "</b></i>"
to:
and then "</i></b>"
Also changed
corresponding "</b></i>"
to:
corresponding "</i></b>"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 200
|
Changed the comment that used to read:
# look for a lap
It now reads:
# look for a lab
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 200
Removed trailing slash from (?=^.*?bell)(?=^.*?lab)/ |
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 205
In the 2nd paragraph from the bottom of the page, |
changed "an educate guess" to "an educated guess"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 214
The words "usage()" and "new()" used to be italicized; |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 218
Keyword = Value |
Changed:
m/(w+)s*=s*(.*)s*$/ # keyword is $1, value is $2
to:
m/(w+)s*=s*(.*?)s*$/ # keyword is $1, value is $2
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 218-219
|
"IP Addresses" section now reads:
Dotted quads (most IP addresses)
# XXX: fails on legal IPs 127.1 and 2130706433
m{
^ ( d | [01]?dd | 2[0-4]d | 25[0-5] )
. ( d | [01]?dd | 2[0-4]d | 25[0-5] )
. ( d | [01]?dd | 2[0-4]d | 25[0-5] )
. ( d | [01]?dd | 2[0-4]d | 25[0-5] )
$
}x
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 226
Changed the assignment from $sink to $fh in the program |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 226
On the "$filename for reading" line, changed "for reading" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 234
1st paragraph |
Change
"The second solution gets a temporary file whose name you can give to another process."
to:
"The second solution from the Solution section gets a temporary file whose name you can give to another process."
|
Anonymous |
|
|
| Printed |
Page 235
1st paragraph |
The sentence:
Text after __DATA__ in Primes.pm can be read from the Primes::DATA filehandle.
is misleading. The filehandle depends on the package in effect at the __DATA__ token, not on the filename.
|
Anonymous |
|
|
| Printed |
Page 237
In the 2nd paragraph, "See 16.15" now reads "See 16.6" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 242
Switched places of 2 blocks of code. |
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 251
All three cases in the code that had "vec($r," now have |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 254
In the Discussion section |
now reads:
"are numeric values normally found lurking C include files."
^ in
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 255
line 7 |
% cc -o fionread fionread
now reads
% cc -o fionread fionread.c
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 259
first paragraph |
Variable name $FileCache::maxopen has been changed to:
$FileCache::cacheout_maxopen.
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 266
Example 7.21: at the bottom of the page within the END{} block |
return rmdir($lockname);
Should be:
rmdir($lockname);
|
Anonymous |
|
|
| Printed |
Page 279
In section 8.2, the first line under "Discussion": |
"file size file" now reads "file size".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 281
|
Paragraph 3 used to read:
Bear this in mind when you choosing a pattern to match.
It now reads:
Bear this in mind when you choose a pattern to match.
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 284
Changed |
$data = '/usr/share/games/fortune';
to:
@ARGV = ('/usr/share/games/fortune') unless @ARGV;
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 284
last code |
$data = '/usr/share/games/fortunes';
now reads
@ARGV = qw( /usr/share/games/fortunes );
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 285
In the 1st paragraph, changed "file, But you usu-" to |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 286
In 8.7 |
@reordered = shuffle(@lines);
now reads
fisher_yates_shuffle(@lines);
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 286
2nd paragraph (first block of code) |
The sixth line of the code has been changed. The code now reads:
# assumes the &suffle sub from Chapter 4
while (<INPUT>) {
push(@lines, $_);
}
fisher_yates_suffle(@lines);
foreach (@lines) {
print OUTPUT $_;
}
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 287
In the code at the bottom of the page, changed |
$tie = tie(@lines, $FILE, O_RDWR, 0666, $DB_RECNO) or die
to
$tie = tie(@lines, "DB_File", $FILE, O_RDWR, 0666, $DB_RECNO) or die
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 292
In the 5th paragraph under Discussion, moved the quote and |
backslash down to the next line.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 295
In code at bottom |
Changed /usr/adm to var/log.
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 295
line 4 from bottom |
... $time, $line, $time);
now reads
... $time, $line, $host);
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 296
In code at bottom |
changed:
($file, @addrs) = @ARGV or die "usage: $0 addr ...";
to:
($file, @addrs) = @ARGV or die "usage: $0 file addr ...";
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 300
|
The order of tests was reversed. It used to read:
do "$APPDFLT/sysconfig.pl"
or
do "$ENV{HOME}/.myprogrc";
Now reads:
do "$ENV{HOME}/.myprogrc";
or
do "$APPDFLT/sysconfig.pl"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 302
The heading used to read Description. It now reads: Discussion |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 303
In the 2nd paragraph, changed |
If you don't have an unrestrictedversion
to read:
If you don't have an unrestricted version
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 304
line 10 of middle code |
The while statement was left-shifted one tabstop.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 305
1st paragraph |
now reads
"... offers features not found on other version of tee."
should read "other versions" instead.
|
Anonymous |
|
|
| Printed |
Page 305
In code at bottom |
Changed usage tee... to usage $0...
Fixed indent of 3rd }
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 307
First line of code |
Changed /usr/adm to var/log
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 307
line -7: |
"sizeofor" now reads "sizeof or".
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 307
line -8 |
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 312
-2.2 |
"change directory" now reads "change the directory." (Sounded too much like
chdir as written).
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 315
In the 2nd paragraph under Discussion, changed "report which |
filenames it couldn't delete, only how many." to read "report
which filenames it couldn't delete, only how many it did delete."
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 315
footnote |
"...by the owner" now reads "...by the file's owner."
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 316
Code block |
Change the five lines of code that did read:
while ($len = sysread IN, $buf, $blksize)) {
if (!defined $len) {
next if $! =~ /^Interrupted/;
die "System read error: $!
";
}
to instead read these seven lines of code:
while (1) {
$len = sysread IN, $buf, $blksize;
if (!defined $len) {
next if $! =~ /^Interrupted/; # ^Z and fg, rarely
die "System read error: $!
";
}
last unless $len;
|
Anonymous |
|
|
| Printed |
Page 317
Changed "eaily tell" to "easily tell" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 317
In the last line of code, removed the bang, changing |
unless (! $seen{$dev,$ino}++){
to
unless ($seen{$dev,$ino}++){
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 317
Code under Discussion |
Changed:
move("datafile.new","datafile.dat")
to:
move("datafile.dat","datafile.new")
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 322
1st line: |
"file;" now reads "filename;".
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 324
In the first code example, changed this line |
return if defined $age && $age > -M;
to read:
return if defined $age && $age > (stat($_))[9];
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 324
In the paragraph under the first code example, changed |
that lets it be called more grep or map.
to read:
that lets it be called like grep or map.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 325
Change the program listing of Example 9.3 to read as follows. |
#!/usr/bin/perl
# rmtree1 - remove whole directory trees like rm -r
use File::Find;
die "usage: $0 dir ..
" unless @ARGV;
find {
bydepth => 1,
no_chdir => 1,
wanted => sub {
if (!-l && -d _) {
rmdir or warn "couldn't rmdir directory $_: $!";
} else {
unlink or warn "couldn't unlink file $_: $!";
}
}
} => @ARGV;
|
Anonymous |
|
|
| Printed |
Page 325
first paragraph in the Discussion section should be changed to |
File::Find has an alternate interface whose first argument is a
reference to a hash of options settings. The C<bydepth> makes
C<find> visit all files beneath a directory before the
directory itself--exactly what we need to remove a directory
and its contents. The C<no_chdir> option stops C<find> from
descending into directories. Finally, the C<wanted> option
takes a code reference, our old C<wanted()> function.
|
Anonymous |
|
|
| Printed |
Page 325
3rd to last line of code |
Indentation of `foreach...' is now flush left
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 329
paragraph following "extension" subroutine |
Change
If you want ".bak" returned, use '..*?' as the second...
to
If you want ".bak" returned, use '.[^.]*' as the second...
|
Anonymous |
|
|
| Printed |
Page 330
1.-7 |
Unfortunately, you dare not preserve the directory permissions when you first
create the directory, because the directory might lack write permission, and
all subsequent link operations will then fail. You have to start out with
write permission, then go back and tighten up those that lacked it, after all
link creation is complete. (Since lacking write permission is rare, a hash of
exceptions could be maintained for the cleanup, or you could make a second
pass).
|
Anonymous |
|
|
| Printed |
Page 330
1.17 |
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 330
1.23 |
chdir $srcdir;
now reads
chdir $srcdir or die "Can't chdir to $srcdir: $!";
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 333
subroutine definitions for user and group |
the line
$user{$uid} = getpwuid($uid)->name || "#$uid"
now reads
$user{$uid} = getpwuid($uid) ? getpwuid($uid)->name : "#$uid"
Likewise, the line
$group{$gid} = getgrgid($gid)->name || "#$gid"
now reads
$group{$gid} = getgrgid($gid) ? getgrgid($gid)->name : "#$gid"
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 336
In the 2nd code example, changed |
return sqrt( ($side1 ** 2) + ($side1 ** 2) );
To read:
return sqrt( ($side1 ** 2) + ($side2 ** 2) );
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 340
In 10.3.4, "See Also" in "Creating Persistent Private Variables" |
used to read:
The sections on "Closures" and on "Package Constructors and
Destructors: BEGIN and END" in Chapter 2 of _Programming Perl_;
However, Closures is in ch04, and BEGIN and END is in ch05. it now reads:
The sections on "Closures" and on "Package Constructors and
Destructors: BEGIN and END" in Chapters 4 and 5 of _Programming Perl_,
respectively;
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 340
1st paragraph of Discussion section, the $ of $variable |
is now is constant-width font.
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 341
Changed "how many nested subroutine calls" to "how many frames (nested |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 352
Line 14 |
Changed "hander" to "handler."
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 356
Paragraph above "See Also" |
Changed:
"before Perl support proper references."
to:
"before Perl supported...."
Fixed alignments of functions under "Solution"
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 358
In the 4th paragraph, changed "too late to useful" to |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 366
The 2nd paragraph used to read: |
really meant "take the fourth element of @x"
It now reads:
really meant "take the fifth element of @x"
366) Also changed the 5th paragraph to read: "If you call ref on
a non-reference, it returns an empty string."
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 367
Line 7 |
Deleted "an" from:
"through an undefined references"
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 368
|
Figure 11-3:, the last two line of text now reads:
Changed:
print "$$a $b
";
3 3
to:
print "$$a
";
3
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 369
Line -16 |
Deleted "create" from:
" thus creating create groups of people."
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 371
Changed |
# access Nth item (best)
To read:
# access item in position N (best)
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 373
Under See Also, changed "Hashs of Arrays" to "Hashes of Arrays". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 373
Changed the text describing the 13.15 recipe to "Tie Example: |
Make a Hash That Always Appends".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 373
|
Code under Solution used to read:
"key2" => "value2 ..."
Now reads:
"key2" => "value2", ...
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 373
Also in the code, changed |
@keys = keys %$hash;
To read:
@keys = keys %$href;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 381
In the 2nd paragraph, changed |
the "prev" and "last" values
To read:
the "PREV" and "LAST" values
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 385
Under Discussion, deleted: "We'll choose a key called |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 385
In the 2nd code example, changed |
my @fields = { split /^([^:]+):s*/m };
to
my @fields = split /^([^:]+):s*/m;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 385
Also changed |
push(@Array_of_Records, { @fields });
to
push(@Array_of_Records, { map /(.*)/, @fields });
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 390
2nd code block |
The first and second-to-last lines of code have been changed. The code now
reads:
use Storable qw(retrieve_fd);
use Fcntl qw(:DEFAULT :flock);
open(DF, "< /tmp/datafile") or die "can't open /tmp/datafile: $!";
flock(DF, LOCK_SH) or die "can't lock /tmp/datafile: $!";
$href = retrieve_fd(*DF);
close(DF);
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 393
In Example 11-1, changed |
while ($n++ < 20) { insert($root, int(rand(1000)) }
to
while ($n++ < 20) { insert($root, int(rand(1000))) }
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 398
Last line |
Changed:
Poker::Deck::shuffle(23)
to:
Cards::Poke::shuffle(23)
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 403
|
BEGIN {
unless (eval "use $mod") {
warn "couldn't load $mod: $@";
}
}
now reads
BEGIN {
eval "use $mod";
if ($@) { warn "$@"}
}
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 413
|
12.6, "See Also" used to read:
the variable in the section on "Special Global
Variables" in Chapter 2 of Programming Perl
It now reads "Global Special Variables"
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 417
6th paragraph; A step was missing. A line has been added before |
"% make dist", so the code now reads:
% perl Makefile.PL
% make dist
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 417
Last paragraph; |
A period was added at the end of the last sentence.
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 420
Under See Also, changed the mention of "SelfLoader" in the |
SEE ALSO into "AutoLoader".
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 429
Changed |
MANIFEST | List of files in the distribution
to read as an entry in the table, not a column heading.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 430
-1.7 |
FineTime.ccc
now reads
Finetime.c && cc
Also, "FineTime.c" in "FineTime.cRunning" was moved to the previous line.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 432
Replaced sample paragraph as follows |
If we had a I<.h> file with function prototype declarations,
we could include that, but since we're writing this one from
scratch, we'll use the B<-c> flag to omit building code to
translate any C<#define> symbols. The B<-n> flag says to
create a module directory named I<FineTime/>, which will have
the following files.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 435
last code comment |
"have your own a" now reads "have your own".
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 444
2nd paragraph, 2nd sentence rephrased |
"Constructors don't have to be class methods; it's often
useful to have object methods that themselves return new
objects, as discussed..."
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 446
Changed |
$lector = Human::Cannibal->new();
$object->feed("Zak");
$object->move("New York");
to
$lector = Human::Cannibal->new();
$lector->feed("Zak");
$lector->move("New York");
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 447
In the 3rd paragraph, last sentence rephrased |
You could call a class method (one expecting a string
argument) on an object or an object method (one expecting
a reference) on a class,
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 451
|
In 13.2, the "See Also" section used to read:
the section on "Garbage Collection" in Chapter 5
Should now reads:
the section "A Note on Garbage Collection"
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 453
Right above the "bless" line in the example at the bottom, |
changed the lone semicolon to read: "};"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 455
Example 13.4, "Solutions" section |
sub DESTROY { --$BodyCount } # destructor
has been changed to:
sub DESTROY { --$Body_Count } # destructor
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 457
This bug is a matter of versions. Under Perl release 5.6 and Class::Struct |
version 0.58, only this line works:
@{$p->peers} = ("Wilbur", "Ralph", "Fred");
whereas this one does not, just as the submitted reported:
$p->peers( ["Wilbur", "Ralph", "Fred" ] ); # set its peers field
However, under Perl release 5.8 and Class::Struct 0.61,
I find that {both are, either is} fine.
I thus suggest making the two lines in question read:
@{$p->peers} = ("Wilbur", "Ralph", "Fred"); # set its peers field
$p->peers( ["Wilbur", "Ralph", "Fred" ] ); # also this way in Perl 5.8
|
Anonymous |
|
|
| Printed |
Page 458
sub Person::age, line 5: |
$struct->{'age'}
should be
$self->{'age'}
|
Anonymous |
|
|
| Printed |
Page 459
2nd paragraph |
Changed: "speed and space arrays..."
to: "speed and space of arrays..."
Changed:
struct Card => map { $_ => '$' } qw(name color cost type release text);
to:
struct Card => { map { $_ => '$' } qw(name color cost type release text) };
(added curly brackets)
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 461
|
Changed the code that read:
if (@ISA && $proto->SUPER::can('new') {
to read
if (@ISA && $proto->SUPER::can('new')) {
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 462
Near bottom |
Changed "$obj2" to "$obj_target"
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 469
|
Last line of code used to read "Jason"; it now reads :
"Kid's parent is Jason"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 470
Added a semicolon under See Also. Now reads: |
"perltoot(1); Chapter 5 of Programming Perl;"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 476
|
2nd paragraph now reads:
Because an object is a higher-level notion than a raw
machine address, ^^^^
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 477
Changed |
sub StrNum($) {
to
sub StrNum {
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 477
Output of show_strnum |
Changed:
values are Red, Black, RedBlack, and 0
to:
values are Red, Black, RedBlack, and RedBlackRedBlackRedBlack
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 478
In the concat function, |
Changed:
return StrNum $inverted ? ($s2 . $s1) : ($s1 . $s2);
to:
return StrNum($inverted ? ($s2 . $s1) : ($s1 . $s2));
In the repeat function,
Changed:
return StrNum $inverted ? ($s2 x $s1) : ($s1 x $s2);
to:
return StrNum($inverted ? ($s2 x $s1) : ($s1 x $s2));
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 484
Changed |
push @{$self->{key}}, $value;
To read
push @{$self->{$key}}, $value;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 492
Changed |
dbmopen %HASH, FILENAME, 0666 # open database, accessed through %HASH
or die "Can't open FILENAME : $!
";
To read:
dbmopen %HASH, $FILENAME, 0666 # open database, accessed through %HASH
or die "Can't open $FILENAME : $!
";
Also added a $ to each occurence of FILENAME, KEY, and VALUE.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 492
Code |
Changed:
untie %hash; # close the database
to:
untie %HASH; # close the database
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 494
Code |
Changed:
untie %hash;
to:
untie %HASH;
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 495
Top of page |
Changed "Reads" and "writes" to "Read" and "write"
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 497
Under Discussion, changed "With SDBM or GDBM" to "With SDBM or NDBM" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 504
Solution section |
Changed:
"Use the CPAN module MLDBM to values more complex values"
to:
"Use the CPAN module MLDBM to store more complex values"
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 510
Under "See Also" |
The URL to the DBI docs online is no longer at symbolstone.org.
The correct URL to this documentation is now http://dbi.perl.org
|
Anonymous |
|
|
| Printed |
Page 510
"See Also" section |
This URL is out of date:
http://www.hermetica.com/technologia/perl/DBI/
The current location of the documents formerly found there now reads:
http://www.symbolstone.org/technology/perl/DBI/
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 510.2.2
www.hermetica.com/technologia/perl/DBI/index.html |
should be
www.arcana.co.uk/technologia/perl/DBI/
326.-2 # change $file
should be # change $newname
<technical, high>
Page 531,
Example 15-4 vbsh:
The last line of the code reads
$term->addhistory($seed_line);
But it should read
$term->addhistory($cmd);
<technical, high>
657.2
$pop->login($username, $password)
should be
defined($pop->login($username, $password))
<technical, high>
658
all occurences of
$pop->login(...)
should be
defined($pop->login(...))
<technical, high>
419.-1
expect to find them in Sample/auto/foo.al and Sample/auto/foo.al
should be
expect to find them in Sample/auto/foo.al and Sample/auto/bar.al
<technical, high>
86 line 3
$time = gettimeofday - $t1;
should be
$time = gettimeofday - $begin;
<technical,high>
165.5
($a = $b) =~ s/x/y/g; # copy $a and then change $b
should be
($a = $b) =~ s/x/y/g; # copy $b and then change $a
<technical, high>
31.-2.-2 return quoteword(",", 0, $_[0];
should be
return quoteword(",", 0, $_[0]);
<technical, high>
453.-1
;
bless($self, $class);
return $self;
should be
};
bless($self, $class);
return $self;
<technical, high>
449.5.4 bless($obref, $classname); # Mark it of the right type
should be
bless($self, $classname); # Mark it of the right type
<technical, high>
449.5.7 return $obref; # And give it back
should be
return $self; # And give it back
<technical, >
486.-3.1
[No way! Way!!] = EVIL>
should read
[No way! Way!!] => EVIL
p. 174
it would be much faster to use s/<[^>]*>//g
should be
it would be much faster to use s/<[^>]*>//gs
p. 237
There's no extra less than symbol
should be
There's no extra greater-than symbol
p.253
$rv = sysread(HANDLE, $buffer, $BUFSIZ);
or die "sysread: $!";
delete the "or die ..." line
Also, in the last page of the acknowledgements, Richard Allen
should be Richard Allan.
|
Anonymous |
|
Dec 01, 1998 |
| Printed |
Page 512
Added a new final line to this page, indented to the same level |
as the chop on the previous line:
next unless defined $href && defined $binary_time;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 516
Line above Discussion section |
Changed:
# --output=string or --output=string
to:
# --output=string or --output string
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 518
In the table, changed |
option:i | Yes | Optional string parameter:
To read:
option:i | Yes | Optional integer parameter:
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 519
|
Under "See Also," it used to read:
the -t file-test operator in Chapter 3 of Programming Perl
Should now reads:
-t file-test operator is in Chapter 2
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 536
Under See Also, changed "by Don Libes, O'Reilly and Associates |
(1996?)" to read "by Don Libes, O'Reilly and Associates (1995)"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 539
Changed |
my $f = $menubar->Menubutton(-text => "File", -underline => 0,
To read:
my $f = $menubar->Menubutton(-text => "Edit", -underline => 0,
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 555
Changed "Chapter 8 of Programming Perl" to "Chapter 6 of |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 556
Deleted this line: ($pid = fork) ? waitpid($pid,0) : exec(@ARGV) |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 556
5th paragraph |
"(but not backticks)" was removed.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 557
Changed Chapter 8 to 6 under See Also. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 558
Last paragraph |
"The exec in Chapter 3" now reads "The exec function in Chapter 3"
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 565
Changed strange-looking font in the right hand column. |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 569
|
In "See Also" under section 16.8 the text used to read:
Special Global Variables
It now reads:
Global Special Variables
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 579
Last block of code |
print _POSIX_PIPE_BUF
now reads
print PIPE_BUF.
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 604
In the 2nd code example, changed |
socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
To read:
socket(TO_SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 605
Changed |
INADDR_ANY is a special address, meaning ``listen on any
interface''. If you want to restrict it to a particular IP
address, add a C<LocalAddr> parameter to your call to
C<IO::Socket::INET-E<gt>new>. If coding by hand code, do this:
to:
If you have several network interfaces, the kernel decides
which one to use based on your current routes. If you wish to
override this default, add a C<LocalAddr> parameter to your call
to C<IO::Socket::INET-E<gt>new>. If coding by hand code, do this:
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 608
Removed the dollar sign in front $SERVER of both calls to fcntl(). |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 608
The URL |
http://www.ecst.csuchico.edu/~guide/net
Is now
http://www.ecst.csuchico.edu/~beej/guide/net"
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 609
|
2nd recv example; The first line used to read:
$server->recv($data_read, $flags)
It has been changed to:
$server->recv($data_read, $maxlen, $flags)
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 617
under "Discussion" concerning UNIX Domain Datagram Server |
The variable LocalAddr was changed to Local and PeerAddr was changed to Peer.
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 618
If you want its actual host name |
use Socket;
$other_end = getpeername(SOCKET)
or die "Couldn't identify other end: $!
";
($port, $iaddr) = unpack_sockaddr_in($other_end);
$actual_ip = inet_ntoa($iaddr);
$claimed_hostname = gethostbyaddr($iaddr, AF_INET);
@name_lookup = gethostbyname($claimed_hostname)
or die "Could not look up $claimed_hostname : $!
";
@resolved_ips = map { inet_ntoa($_) }
@ips_for_hostname[ 4 .. $#ips_for_hostname ];
But look at the misconnect between the variables used in the last two lines!
They now read:
@name_lookup = gethostbyname($claimed_hostname)
or die "Could not look up $claimed_hostname : $!
";
@resolved_ips = map { inet_ntoa($_) }
@name_lookup[ 4 .. $#name_lookup ];
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 628
Fixed typo in See Also: now reads "The select function in.." |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 630
In the code example, changed |
if ($rv == length $outbuffer{$client} ||
{$! == POSIX::EWOULDBLOCK) {
It should read:
if ($rv == length $outbuffer{$client} ||
$! == POSIX::EWOULDBLOCK) {
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 631
|
Second to last paragraph; The first sentence used to read:
We use getsockopt and setsockopt to turn on...
It has been changed to read:
We use fcntl to turn on...
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 632
Fixed typo in See Also: now reads "The select function in.." |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 634
Add this in the Solution just before the paragraph beginning |
"Disassociate":
Close the three standard filehandles by reopening
them to F</dev/null>:
for my $handle (*STDIN, *STDOUT, *STDERR) {
open($handle, "+<", "/dev/null")
|| die "can't reopen $handle to /dev/null: $!";
}
|
Anonymous |
|
|
| Printed |
Page 644
|
The 3rd paragraph used to read:
in Chapter 1, Web Automation.
It now reads:
in Chapter 20, Web Automation.
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 645
Under Discussion, changed "and inet_aton to convert back:" to |
read "and inet_ntoa to convert back:"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 648
First block of code |
All double quotes are now straight quotes
|
Anonymous |
|
Mar 01, 2000 |
| Printed |
Page 651
In the code example under Solution, changed |
$mailer = Mail::Mailer->new();
to
$mailer = Mail::Mailer->new("sendmail");
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 652
Changed |
$mailer->open( 'From' => 'Nathan Torkington <gnat@frii.com>',
'To' => 'Tom Chritiansen <tchrist@perl.com>',
'Subject' => 'The Perl Cookbook' );
to:
$mailer->open( { From => 'Nathan Torkington <gnat@frii.com>',
To => 'Tom Chritiansen <tchrist@perl.com>', Subject => 'The Perl Cookbook' } );
(Note addition of {} around the parameter.
Omission of the ')
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 655
|
In the last paragraph, changed "NetNews Transfer Protocol" to read:
"Network News Transfer Protocol"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 656
In the first code example, changed |
or die "Can't fetch article $article_number: $!
";
To read:
or die "Can't fetch article $message_id: $!
";
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 658
2nd paragraph |
The example coded now reads:
$undeleted = $pop->list();
foreach $msgnum (keys %$undeleted) {
$msgsize = $undeleted->{$msgnum};
print "Message $msgnum is $msgsize bytes long.
";
}
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 659
Under See Also, changed "RCS 1734" to "RFC 1734" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 661
Fixed the typo under See Also. It now reads: "The documentation |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 661
Fixed the typo in the 2nd paragraph under Discussion; 2nd sentence |
now reads: "The machine is considered unreachable"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 669
|
Moved parantheses in the 2nd sentence. Now reads:
(Don't confuse HTTP methods with the methods of
object-orientation. They have nothing to do with
each other).
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 677
Changed the version output from "2.40" to "2.49". |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 677
|
Changed last paragraph to read:
prints @INC (Perl's array of directories it looks for
^^^^^
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 679
In the third bullet item under Solution, changed "quite by talking" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 684
Code |
Changed:
die "cannot fork: $!" unless defined ($pid = open(SAFE_KID, "|-"));
to:
die "cannot fork: $!" unless defined ($pid = open(SAFE_KID, "-|"));
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 685
Deleted |
$pid = open(KID_TO_WRITE, "|-");
which was above line:
die "cannot fork: $!" unless defined($pid = open(KID_TO_WRITE, "-|"));
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 691
In example 19-6, changed |
my $server = HTTP::Daemon->new(Timeout => 60);
To read:
my $server = HTTP::Daemon->new(Timeout => 60, LocalPort => 8989);
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 698
In the 2nd code example, changed |
print header("Program Title"), begin_html();
It now reads:
print header("Program Title"), start_html();
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 707
In the table, deleted two lines: "LWP::UserAgent" and "URI::URL" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 708
Under Discussion, changed |
We use four different modules from LWP.
To read:
We use three modules from LWP and one other from CPAN.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 711
|
Changed "isn't <EASY> and <FUN>" would yield:" to read :
"isn't <EASY>&<FUN>" would yield:
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 716
Under Solution, changed "the LWP modules:" to read "the CPAN modules:" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 716
|
third paragraph now reads:
A correct but slower and slightly more complicated way is
to use the HTML-Tree bundle of modules from CPAN:
|
Anonymous |
|
Dec 01, 2000 |
| Printed |
Page 717
In the 2nd paragraph, changed "the HTML parsing routines from LWP" |
to read "the HTML parsing routines from CPAN"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 717
And in the next paragraph, changed "subclass LWP's HTML::Parser class" |
to read "subclass the HTML::Parser class"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 720
In Example 20-6, changed |
my($req, $ans);
To read:
my $ans;
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 722
In the second code example, changed |
{ int($seconds / 60) } minutes.
To read:
{ int($total / 60) } minutes.
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 722
Under Discussion, changed "$whats_his_name, $login_count, and |
$minute_used" to read "$username, $count, and $total"
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 723
In Example 20-7, changed |
'total' => $total
To read:
'total' => $seconds
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 723
In Example 20-7, changed |
'total' => $seconds
To read:
'total' => $total
|
Anonymous |
|
Sep 01, 1999 |
| Printed |
Page 726
Deleted the pipe and the line between "Disallow: /" and |
"User-agent: Mozilla ..."
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 731
|
{731} Changed `index.html' to `scooby.html'
|
Anonymous |
|
Jan 01, 2000 |
| Printed |
Page 737
In the Index, changed |
binary numbers, convering with decimal numbers, 48-49
Now reads:
binary numbers, converting with decimal numbers, 48-49
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 738
Changed |
comments, in regular expressins
To read:
comments, in regular expressions
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 741
Changed "escaping chacters" to "escaping characters" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 742
Changed "FileHandler" to "FileHandle" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 743
Index |
getsockopt() has been deleted from the index.
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 746
Deleted "LWP::Heuristic" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 749
Changed "pattern-matching" to "pattern matching" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 749
Changed "multiple-byte charactrs" to "multiple-byte characters" |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 750
Added page 110 to prototypes entry |
|
Anonymous |
|
May 01, 1999 |
| Printed |
Page 752
Index |
"Schwartzian Transformation" should be added, indexed to page 120.
|
Anonymous |
|
|
| Printed |
Page 752
Index |
setsockopt() used to be indexed to page 631. It is now indexed to page 610.
|
Anonymous |
|
Aug 01, 2001 |
| Printed |
Page 756
|
(756) Added page 709 to URI::Heuristic entry
|
Anonymous |
|
May 01, 1999 |