Errata for Learning Perl
Submit your own errata for this product.
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update
| Version |
Location |
Description |
Submitted By |
Date Submitted |
| PDF, ePub, Mobi, Safari Books Online |
Page 12
last paragraph |
"PFE (Programmer's Favorite Editor)" should be "PFE (Programmer's File Editor)"
http://www.lancs.ac.uk/staff/steveb/cpaap/pfe/
|
Tim Hofsommer |
Apr 30, 2013 |
| Safari Books Online |
149
second paragraph from the bottom of page |
The text of the book says the following:
<begin clip from book>
For example, suppose you had some HTML-like text, and you
want to remove all of the tags <BOLD> and </BOLD>, leaving their contents intact. Here's
the text:
I'm talking about the cartoon with Fred and <BOLD>Wilma</BOLD>!
And here's a substitution to remove those tags. But what's wrong with it?
s#(.*)#$1#g;
<end clip from book>
That pattern won't replace the BOLD tags. Given what is written further on to demonstrate a non-greedy asterisk quantifier:
s#<BOLD>(.*?)</BOLD>#$1#g;
I am guessing that the original pattern was meant to be the following which uses a greedy asterisk quantifier:
s#<BOLD>(.*)</BOLD>#$1#g;
|
Anonymous |
Apr 03, 2013 |
| Printed |
Page 185
6th paragraph and following code snippet |
The text in paragraph 6 implies if and only if the environment variable 'VERBOSE' is set the code snippet below will print a message, but the code snippet assigns '1' if the environment variable is not set, which ends up evaluating to true and printing the message.
|
Anonymous |
Mar 26, 2013 |
| PDF |
Page 351
1st code |
foreach my $arg ( @ARGV ) {
push @new_ARGV, decode $codeset, $_;
}
should be
foreach my $arg ( @ARGV ) {
push @new_ARGV, decode $codeset, $arg;
}
or
foreach ( @ARGV ) {
push @new_ARGV, decode $codeset, $_;
}
|
mkamimura |
Mar 16, 2013 |
| PDF |
Page 335
2nd paragraph, 1st sentence |
This is the sentence:
"In Chapter 16, we mentioned the map and grep list-processing operators."
Change "Chapter 16" to "Chapter 17".
|
aphilipp |
Mar 04, 2013 |
| PDF |
Page 269
5th paragraph, 1st sentence |
This is the sentence:
"The pipe opens can also take more than three commands."
Change "commands" to "arguments".
|
aphilipp |
Mar 03, 2013 |
| PDF |
Page 317, 318
Chap 13 Ex 1,2,3 |
This is the code section:
chomp(my $dir = <STDIN>);
if ($dir =~ /\A\s*\Z/) { # A blank line
Because there will never be a newline after the end-of-string anchor, change "\Z" to "\z":
chomp(my $dir = <STDIN>);
if ($dir =~ /\A\s*\z/) { # A blank line
|
aphilipp |
Feb 20, 2013 |
| PDF |
Page 140
2nd paragraph |
Change all instances of "\z" to "\Z".
|
aphilipp |
Jan 31, 2013 |
| PDF |
Page 89
1st footnote |
Change "zero or one arguments" to "zero or one argument".
|
aphilipp |
Jan 21, 2013 |
| PDF |
Page 71
6th paragraph |
This is the text:
"you can't have two lexical variables with the same name declared in the same scope"
When I test this, the code runs and I only get a warning that a "my" variable masks an earlier declaration in the same scope. Therefore isn't the above text incorrect?
|
aphilipp |
Jan 18, 2013 |
| PDF |
Page 104
5th code example, 1st line |
This is the line:
print { $rock_fh }; # uses $_ by default
According to the documentation, only a real filehandle like FH can be used alone to print the contents of $_. Using an indirect filehandle as seen in this example gives a syntax error.
|
aphilipp |
Jan 13, 2013 |
| PDF |
Page 34
3rd code example |
This is the code example:
$code_point = ord( 'א' );
If you look closely, the closing quote, the closing parenthesis, and the semicolon are of a different font than the beginning.
|
aphilipp |
Jan 11, 2013 |
| Printed, PDF, ePub |
Page 132
Exercise 5 |
Text is "Make a program that prints each line that has a two of the same nonwhitespace
characters next to each other."
The "a" before "two" should be removed.
|
Paul Trost |
Nov 27, 2012 |
|
| |