Perl in a Nutshell by Ellen Siever, Stephen Spainhour & Nathan Patwardhan Unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. This page was updated February 14, 2003. 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 UNCONFIRMED errors and suggestions from readers: ?reader suggestion? When I went to look up "Here Documents" they weren't in the index anywhere. You might look into adding it to future editions. [43] 4th paragraph, "Comments and documentation": "Lines starting with = are interpreted as the start of a section of embedded documentation (pod), and all subsequent lines until the next =cut are ignored by the compiler." Using this sentence alone, it is clear that a section of pod documentation, which should be ignored by the compiler, begins with an equal sign (=). In practice, this generates a compiler error because, as pg. 80 (Pod portion of "Language Basics) makes clear, a pod section begins with "=pod". {43} paragraph starting with Comments: In the sentence: Comments within a program are indicated by a pound sign (#). # is NOT a pound sign. A pound sign is used with British currency. This is repeated under "pound sign" in the index, whereas # is called (correctly) "hash mark". (68) 3rd paragraph under "Pattern Match Variables"; The sentence reads: "The dollar sign notation should used in the replacement..." It should read: "The dollar sign notation should be used in the replacement..." (132) definition of substr: It should be added that the substr function starts with letter position of zero. (139) Explanation of 'values' function; Third sentence reads: "To sort the hash by its values, see the example under 'keys'." The 'keys' function on page 108 has no such e xample. Either is was never added or I'm looking in the wrong place. Here's one way to do it: sort {$terms{$a} <=> $terms{$b}} keys %hash [329] sample code, 4th line: line reads: read ($STDIN, $form_info, .... should be: read (STDIN, $form_info, .... {330} Second code fragment; $query = CGI::new; should be $query = CGI->new; As CGI.pm is being used in a OO way in this example you should use the OO way of calling "new". [343, 352] param: Under "param" you neglect to mention that this only works for HTML forms. Page 352 should have: url_param('filenme') After hours of confusion as to why $query->param("filename") wouldn't work, I found the following in the CGI.pm docs: ---------------- MIXING POST AND URL PARAMETERS $color = $query->url_param('color'); It is possible for a script to receive CGI parameters in the URL as well as in the fill-out form by creating a form that POSTs to a URL containing a query string (a "?" mark followed by arguments). The param() method will always return the contents of the POSTed fill-out form, ignoring theURL's query string. To retrieve URL parameters, call the url_param() method. Use it in the same way as param(). The main difference is that it allows you to read the parameters, but not set them. (370-375) The whole DBI section is all dealphabetized. func() comes before execute(), etc. Boy, that's annoying. {375} bind_col() and bind_columns() are in the middle of an alphabetical list when they should be back 4 pages. {441} first listing on the page: $ftp->cwd($home),"\n"; The ,"\n" is useless. {442} 8th line of code at top: There's a "$quert" that should be "$query". (453) The program needs to be prefaced by the URL in the call to URI::URL with "http://". To get to the outside the reader had to use the "proxy" method and that too required the "http://" preface. This is the code that worked to access www.ora.com: use LWP::UserAgent; $hdrs=new HTTP::Headers(Accept => 'text/plain', User-Agent => 'MegaBrowser/1.0'); $url=new URI::URL('http://www.ora.com'); $req=new HTTP::Request(GET, $url, $hdrs); $ua= new LWP::UserAgent; $ua->proxy('http', 'http://www-proxy.pa.dec.com:8080'); $resp=$ua->request($req); if ($resp->is_success) { print $resp->content; } else { print $resp->message; } {461} $req = http::Request->new(method, url, ... should be: $req = HTTP::Request->new(method, url, ... (http should be capitalized). {518} Chapter 18, Perl/Tk, covering the Text widget: The example says: $text->delete(0, 'end'); The proper code should be: $text->delete('0.0', 'end'); [587] error on page 587 regarding the Win32::Registry example. It reads: $p = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"; but I could only get it to work with single quotes, ie: $p = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion'; This was using ActiveState Perl 5.6.1 binary build 629 {594} There are incorrect pathnames in the examples. For instance, there's the string "C:\PERL5\BIN\PERL.EXE," which is not legal. \P and \B are unrecognized escape sequences. The backslashes should be doubled. This also occurs on page 587. {606} example at bottom of page: There is a "0" instead of a closing double quote. {607} bottom of page: You've got "pro- vide". [615] errata for 99 version in Win32 Setting cookies examples; code example reads: <% if ( defined($Request->Cookie("user")) { $userid = $Request->Cookie("user")->Item; } else { $Response->Cookie("user") = 123; }; %> missing righthand bracket on if line