Learning Perl, 4th Edition by Randal L. Schwartz, Tom Phoenix, brian d foy This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated July 8, 2008. 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: (4) first line; It's a retronym, not an acronym.... should be: It's a backronym, not an acronym (95) line 2; we could easily see see which ones should read instead we could easily see which ones (106) First line of the exercises; Change the line See Appendix Q for answers to the following exercises: it should read as See Appendix A for answers to the following exercises: (116) first footnote; A period is missing at the end of the first footnote. Change: "which is practically everywhere" to: "which is practically everywhere." [177] middle of page; the sample snippet of code shown does not work. the rmdir() function accepts only a single directory to delete, at one time. attempting to pass more than one directory argument, as glob will do if there is more than 1 subdirectory under fred, will only succeed in deleting the first directory. rmdir glob "fred/*" This is confirmed by the perldoc page on rmdir(). rmdir FILENAME rmdir Deletes the directory specified by FILENAME if that directory is empty. If it succeeds it returns true, otherwise it returns false and sets $! (errno). If FILENAME is omitted, uses $_. [177] middle of page;in addition to my previous note, I should also point out an error in the description of the return value for the rmdir() function. The following line is technically incorrect. "As with unlink, rmdir returns the number of directories removed, and if invoked with a single name, it sets $! in a reasonable manner on a failure." As pointed out earlier, rmdir() only accepts a single argument, and if more than one is provided, it ignores all but the first. Additionally, the return value of rmdir() is either 1 upon successful deletion of an empty directory, or 0 if no directory was deleted. (179) last paragraph before the exercises; change the phrase: because it's primary purpose to be instead: because its primary purpose (179) exercise 1, last line; Change the phrase: "but don't try show the contents." to read instead: "but don't try to show the contents." (191) line 1 of the exercises; Change the phrase "See Appendix 1 for answers to the following exercises:" to be instead "See Appendix A for answers to the following exercises:" (211) 6th paragraph; The last sentence in the paragraph beginning "Well, that worked for Unix" reads "In that case, you'd have that machine's kind of filename string in $name, in that case." I think that you only want "in that case" once. (216) line 1 of the exercises; Change the phrase "See Appendix Q" to be instead "See Appendix A" Since there is more than one exercise, please change the phrase "to the following exercise:" to be instead "to the following exercises:" [234] Exercise answer; The code stating at the top of the page should read foreach my $element (@_) [247] exercises 5, 6, and 7 solution; The solution code used for chapter 12, exercise 5, makes use of modules that have not been covered in the chapter (nor in the book up to this chapter). Modules File::Basename and File::Spec are covered later in the book in Chapter 15 and Appendix B. (250) line 25; Change the phrase "in this case with last)." to "in this case with last.)" In other words, the period and the parenthesis should be reversed. (252) Heading for Chapter 15 exercises; Change the heading for Chapter 15 exercises from "Answer to Chapter 15 Exercise" to "Answer to Chapter 15 Exercises" (i.e., the word "exercise" should be plural.) (252) last line of Chapter 15, exercise 1; Change "details later.)" to "details later)." In other words, the parenthesis and the period are in the wrong order. The period should be outside the parenthesis, because the period is ending the outside sentence "This answer uses a hash reference"