Programming Perl, 3rd Edition by Larry Wall, Tom Christiansen & Jon Orwant This errata page lists errors outstanding in the most recent printing. If you have any error reports or technical questions, you can send them to booktech@oreilly.com. (Please specify the printing date of your copy.) This page was updated on February 28, 2007. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: (13) 3rd-to-last paragraph, "adding a level to a nested data structure it is like adding": Remove the word "it". {22} last parapgraph: After "or infix operators (which go in between their operands)," add "or postfix operators (which go after their operands)." {37} code: The code at the top of the page will print a line multiple times if it has multiple URLs in it. That does not appear to be the intent. (38) The penultimate sentence of the penultimate paragraph says "This is something to watch out for especially when ...". This should say "Be especially careful when you are using ..." (54) 1st paragraph: Remove right parenthesis after "scope." (55) The first sentence in the fourth paragraph reads "As of version 5.6, Perl also has an extensible syntax for internal variables names". The word should be "variable". {67} fourth paragraph (the sauces example): The match regular expression in this example, "m/(\S.*\S)/g", will fail to match sauces whose name consist of a single character (i.e. sauce "a"). (71) In the third paragraph, the third sentence says "Note that what we earlier said still holds." Change this to "said earlier" to make the phrasing a bit less stilted. (73) In the second paragraph, the second sentence says "Like the @files array we mentioned earlier the comma operator knows...". A comma should be inserted after the word "earlier". (78) "Tyepglobs and Filehandles" section, 1st sentence: "Perl uses an special type ..." Change "an" to "a". (126) 2nd paragraph of "goto" section: "cant" should be "can't." (150) In the third paragraph, the second sentence says "The numbered variables are still set even when ...". A comma should be added after "set". (178) 5th paragraph; The sentence reads: "The second way to defeat leftmostness to use positional assertions..." It should read "The second way to defeat leftmostness is to use positional assertions..." (206) top, first word on page: "contination" should read "continuation". (209) 2nd paragraph: "the same time as rest" => "the same time as the rest". (219) 2nd-to-last paragraph: In "Since @_ is a just a regular array..." remove the first "a". (269) middle; # Create an reference to an array of array references should be # Create a reference to an array of array references (302) listing for the Bestiary module change the last line from this: 1; to this: 1; # Important -- modules must always return a true value. (314) bottom of page; "It would therefore be be equivalent to this:" should be "It would therefore be equivalent to this:" (325) 3rd paragraph, last line: ...instead of leftmost one. Change to: ...instead of the leftmost one. (331) 4th paragraph, last line: ...in the recipe 13.13, "Coping with Circular Data Structures". Change to: ...in recipe 13.13, "Coping with Circular Data Structures". (336) "Generating Classes with Class::Struct" section, 2nd sentence: This creates all the trapping you'll need... should be "trappings." {338-339} 2nd code example (bottom of 338 to top of 339): The $field and $slot variables are improperly transposed in the code which assigns the closure reference to a symbol table slot. *$field = sub { my $self = shift; $self->{$slot} = shift if @_; return $self->{$slot}; }; should be *$slot = sub { my $self = shift; $self->{$field} = shift if @_; return $self->{$field}; }; (361) "Inheritance and Overloading" section, 2nd paragraph, 1st sentence: "a overloaded class" should be "an overloaded class." (415) 2nd paragraph, 6th line: "automaticaly" should be "automatically". (437) 1st para: "exceptions: it that all" => "exceptions: that all" (465) 1st paragraph under The Compilation Phase, 5th line.; Line begins, "be run as as soon ...." One "as" should be removed. (477) section "Code Generators", 3rd sentence: "... and more CPU time than than they would ordinarily.": Remove one of the thans. (478) 2nd-to-last paragraph, 4th line: "...whereas in the C code generated by B::CC..." should be "...whereas the C code generated by B::CC..." (486) 3rd-to-last line: missing closing parenthesis in "Interprocess Communication". (508) middle of page, paragraph beginning "As you see": second line If you'` had set an action, there also would also should be If you had set an action, there would also (509) 4th-to-last paragraph: "to set breakpoint on loading" should be "to set a breakpoint on loading." (523) 2nd paragraph: "the the @DB::args array" should be "the @DB::args array." (526) 4th paragraph, last line: "(see described later)" should be "(as described later"). (610) last bullet point: "Don't put semicolon at the end of a one-line block" should be "Don't put a semicolon at the end of a one-line block" {610} Last example code in the last bullet; 2nd line of code looks like: $comments++, next LINE if /#/; It should be: $comments++, next LINE if /^#/; (671) 2nd paragraph: "have a a numeric value" should be "have a numeric value" (758) Table 29-3; extra space after comma, in description for "B" {764} under the entry for pipe, in the one-sentence paragraph beginning "(As with open": autovivfied should be autovivified {783} semget: Delete "SIZE" in function reference. [792] last block of code: change to: @sorted_lines = map { $_->[0] } sort { $a->[4] <=> $b->[4] # beware: indices really # appear to start at 1 || $a->[1] cmp $b->[1] || $a->[3] <=> $b->[3] || ... } map { [$_, split /:/] } @lines; With this, there would be no need to allocate an @a_fields and an @b_fields arrays, and to fill them with what already is in @$a and @$b. (811) 1st paragraph; "... 1 to set the it to the ..." should be: "... 1 to set it to the ..." {812} description of syswrite: The set of allowable calling sequences indicates that LENGTH is an optional argument. The description that follows doesn't specify what happens if no LENGTH is given. Presumably, all the bytes in the scalar are written, but one doesn't like to presume. (819) "unlink", 2nd par.; From the book: "The unlink function will not delete directories unless you are superuser and the supply -U command-line..." should be "The unlink function will not delete directories unless you are superuser and supply the -U command-line..." (822) 1st paragraph: "Most use declarations looks like this:" should be "Most use declarations look like this:" (index) Add Entry "getenv (see environment variables)" (1066) 11th line from the bottom of column 2; command line, xxxii should be command line, xxx page xxiii does not exist