Higher-Order Perl Errata

For 1st printing (2nd printing, what?)

Last update: 23 March 2014

Listing by contributor | Listing by date reported | Listing by page number | Listing by severity


(substantive error)

In increment_odometer(), the line

        until ($odometer[$wheel] < 9 || $wheel < 0) {

should perform the tests in the other order:

        until ($wheel < 0 || $odometer[$wheel] < 9) {

It is not logically correct to use $wheel as an array subscript when it might be out of range. The function works as printed, but this is something of a lucky fluke.

An analogous problem is present in increment_pattern() on page 133.

Return to: Universe of Discourse main page | What's new page | Perl Paraphernalia | Higher-Order Perl