Errata and Addenda

The Perl book, Programming Perl , has the following omissions and goofs.

On page 5, the examples which read eval "/usr/bin/perl

should read

eval "exec /usr/bin/perl

On page 195, the equivalent to the System V sum program only works for very small files. To do larger files, use

undef $/;

$checksum = unpack("%32C*",<>) % 32767;

The descriptions of alarm and sleep refer to signal SIGALARM. These should refer to SIGALRM. The −0 switch to set the initial value of $/ was added to Perl after the book went to press.

The −l switch now does automatic line ending processing. The qx// construct is now a synonym for backticks.

$0 may now be assigned to set the argument displayed by ps (1).

The new @###.## format was omitted accidentally from the description on formats.

It wasn’t known at press time that s///ee caused multiple evaluations of the replacement expression.

This is to be construed as a feature.

(LIST) x $count now does array replication.

There is now no limit on the number of parentheses in a regular expression.

In double-quote context, more escapes are supported: \e, \a, \x1b, \c[, \l, \L, \u, \U, \E. The latter five control up/lower case translation.

The $/ variable may now be set to a multi-character delimiter.

There is now a g modifier on ordinary pattern matching that causes it to iterate through a string find- ing multiple matches.

All of the $ˆX variables are new except for $ˆT.

The default top-of-form format for FILEHANDLE is now FILEHANDLE_TOP rather than top. The eval {} and sort {} constructs were added in version 4.018.

The v and V (little-endian) template options for pack and unpack were added in 4.019.