Perl Cookbook by Tom Christiansen & Nathan Torkington The following changes were made in the 8/01 reprint: 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 [18] code example, middle of page: $$1 has been changed to ${$1} in two instances. The code now reads: # expand variables in $text, but put an error message in # if the variable isn't defined $text =~ s{ \$ # find a literal dollar sign (\w+) # find a "word" and store it in $1 }{ no strict 'refs'; # for $$1 below if (defined ${$1}) { ${$1}; # expand global variables only } else { "[NO VARIABLE: \$$1]"; # error msg } }egx; [259] first paragraph; Variable name $FileCache::maxopen has been changed to: $FileCache::cacheout_maxopen. [286] 2nd paragraph (first block of code); The sixth line of the code has been changed. The code now reads: # assumes the &suffle sub from Chapter 4 while () { push(@lines, $_); } fisher_yates_suffle(\@lines); foreach (@lines) { print OUTPUT $_; } [390] 2nd code block; The first and second-to-last lines of code have been changed. The code now reads: use Storable qw(retrieve_fd); use Fcntl qw(:DEFAULT :flock); open(DF, "< /tmp/datafile") or die "can't open /tmp/datafile: $!"; flock(DF, LOCK_SH) or die "can't lock /tmp/datafile: $!"; $href = retrieve_fd(*DF); close(DF); [417] 6th paragraph; A step was missing. A line has been added before "% make dist", so the code now reads: % perl Makefile.PL % make dist (417) Last paragraph; A period was added at the end of the last sentence. {455} Example 13.4, "Solutions" section: sub DESTROY { --$BodyCount } # destructor has been changed to: sub DESTROY { --$Body_Count } # destructor [609] 2nd recv example; The first line used to read: $server->recv($data_read, $flags) It has been changed to: $server->recv($data_read, $maxlen, $flags) {631} Second to last paragraph; The first sentence used to read: We use getsockopt and setsockopt to turn on... It has been changed to read: We use fcntl to turn on... [743] Index; getsockopt() has been deleted from the index. [752] Index; setsockopt() used to be indexed to page 631. It is now indexed to page 610.