Errata

Learning Perl

Errata for Learning Perl, Eighth Edition

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. 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.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Chapter 5
11th paragraph of "Output to Standard Output"

The paragraph with the mistake:
But if you (or a program) may be waiting impatiently for the output, you may wish to take that performance hit and flush the output buffer each time you print. See $! in the perlvar documentation for more information on controlling buffering in that case.

There is most likely a typo -- the $! is variable which contains recent errno value, while output autoflush control variable is a $|
Source: perldoc ( https://perldoc.perl.org/perlvar#$%7C and https://perldoc.perl.org/perlvar#$! )

Note from the Author or Editor:
Change as noted. The $! should be $|

Arseni Nimera  Jul 27, 2021 
Page 9
the second to last paragraph

Perl.org have upgraded to more secure connection.

Correct address:

https://learn.perl.org/

Note from the Author or Editor:
Update "http://learn.perl.org" to be "https://learn.perl.org", including the link

Ruey-Cherng Yu  Mar 10, 2022 
Page 58
First line of the <STDIN> in List Context section

I am not sure if indeed this is an error but figured I'd call it out given the emphasis at the start of the section on the distinction between lists and arrays. The end of this line says "in an array context" whereas (I think) it should more generally say "in a list context" (the former is a special case of the latter).

(Apologies, I accidentally entered this into the errata in the 6th edition product earlier.)

Note from the Author or Editor:
change to "list context" as noted

Jonathan Sharir-Smith  Apr 19, 2024 
Page 87
9th paragraph

The text says:

"See $! in the perlvar documentation for more information on controlling buffering in that case."

$! holds the current value of errno, according to the perlvar doc; I suspect the authors meant $| instead.

Note from the Author or Editor:
Change to "$| holds ..." as noted. That means changing the exclamation point as printed to the pipe character, |

mckzm  Dec 08, 2024 
Page 103
last line in last paragraph

$rock_fh --> $rocks_fh

Note from the Author or Editor:
In the last line on the page, change $rock_fh to $rocks_fh

Ruey-Cherng Yu  Mar 10, 2022 
Page 104
first line of first paragraph

$rock_fh --> $rocks_fh

Note from the Author or Editor:
In the first line on the page, change $rock_fh to $rocks_fh

Ruey-Cherng Yu  Mar 10, 2022 
Page 138
second code example

"Found a URL\n" --> "Found a .png\n"

Note from the Author or Editor:
In the second code block, change

if ( /\.png\z/ ) {
print "Found a URL\n";
}

to

if ( /\.png\z/ ) {
print "Found a PNG\n";
}

Ruey-Cherng Yu  Mar 10, 2022 
Page 143
3rd code example

First comment should be "one or more digits" instead of "one or more digits before the decimal point"

Note from the Author or Editor:
In this example

/
[0-9]+ # one or more digits before the decimal point
[#] # literal pound sign
/x

Change as noted to

/
[0-9]+ # one or more digits
[#] # literal pound sign
/x

Ruey-Cherng Yu  Mar 10, 2022 
Page 234
last paragraph

"the pattern /\.old$/" was not updated to corresponding "/\.old\z/" showed in the code example.

Note from the Author or Editor:
In the last paragraph, change:

So you use the pattern /\.old$/ to mean

to

So you use the pattern /\.old\z/ to mean

Ruey-Cherng Yu  Mar 10, 2022 
Page 299
first line in first code example

it could be better to add the comment "# or Ctrl-Z" for people who use Windows.

Note from the Author or Editor:
In the two code lines on that page that are:

print "Enter some lines, then press Ctrl-D:\n";

we can change that to

print "Enter some lines, then press Ctrl-D:\n"; # or Ctrl-Z on Windows

Ruey-Cherng Yu  Mar 11, 2022 
Page 355
last paragraph in "Installing a Recent Perl"

Perlbrew have upgraded to more secure connection.
Correct address: https://perlbrew.pl

Note from the Author or Editor:
Change URL to have https

Ruey-Cherng Yu   Apr 05, 2022 
Page 359
Symbols section

= (binding operator) seems typo


Correct one:
=~ (binding operator)

Note from the Author or Editor:
Correct as noted.

Ruey-Cherng Yu  Mar 10, 2022 
Page 368
Q section

Typo:
qw()()

Correct one:

qw()

Note from the Author or Editor:
In that index entry, there should be only one set of parentheses.

Ruey-Cherng Yu  Mar 10, 2022