The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
| Version |
Location |
Description |
Submitted By |
| Printed |
Page 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".
|
Anonymous |
| Printed |
Page 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".
|
Anonymous |
| Printed |
Page 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..."
|
Anonymous |
| Printed |
Page 132
definition of substr |
It should be added that the substr function starts with letter position of
zero.
|
Anonymous |
| Printed |
Page 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
|
Anonymous |
| Printed |
Page 329
sample code, 4th line |
line reads:
read ($STDIN, $form_info, ....
should be:
read (STDIN, $form_info, ....
|
Anonymous |
| Printed |
Page 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".
|
Anonymous |
| Printed |
Page 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.
|
Anonymous |
| Printed |
Page 370-375
The whole DBI section is all dealphabetized. func() comes before |
execute(), etc. Boy, that's annoying.
|
Anonymous |
| Printed |
Page 375
bind_col() and bind_columns() are in the middle of an alphabetical list |
when they should be back 4 pages.
|
Anonymous |
| Printed |
Page 441
first listing on the page |
$ftp->cwd($home),"
";
The ,"
" is useless.
|
Anonymous |
| Printed |
Page 442
8th line of code at top |
There's a "$quert" that should be "$query".
|
Anonymous |
| Printed |
Page 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; }
|
Anonymous |
| Printed |
Page 461
|
$req = http::Request->new(method, url, ...
should be:
$req = HTTP::Request->new(method, url, ...
(http should be capitalized).
|
Anonymous |
| Printed |
Page 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');
|
Anonymous |
| Printed |
Page 587
error on page 587 regarding the Win32::Registry example. |
It reads:
$p = "SOFTWAREMicrosoftWindows NTCurrentVersion";
but I could only get it to work with single quotes, ie:
$p = 'SOFTWAREMicrosoftWindows NTCurrentVersion';
This was using ActiveState Perl 5.6.1 binary build 629
|
Anonymous |
| Printed |
Page 594
There are incorrect pathnames in the examples. For instance, there's the |
string "C:PERL5BINPERL.EXE," which is not legal. P and B are
unrecognized escape sequences. The backslashes should be doubled. This also
occurs on page 587.
|
Anonymous |
| Printed |
Page 606
example at bottom of page |
There is a "0" instead of a closing double quote.
|
Anonymous |
| Printed |
Page 607
bottom of page: |
You've got "pro- vide".
|
Anonymous |
| Printed |
Page 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
|
Anonymous |