Errata

Perl for System Administration

Errata for Perl for System Administration

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 12

"Rain Forrest Puppy" now reads "Rain Forest Puppy."

Anonymous    Aug 01, 2000
Printed
Page 15
last sentence of last paragraph (bullet 2)

The sentence "It is better to bite the bullet and write \\winnt emp..."
now reads "...and write \\winnt\temp\..."

Anonymous    Oct 01, 2000
Printed
Page 21

"Sub ScanDirectory{" now begins with a lowercase "s" as in "sub ScanDirectory{."

Anonymous    Aug 01, 2000
Printed
Page 21

print "found one in $workdir
"

now reads:

print "found one in $workdir
";

Anonymous    Oct 01, 2000
Printed
Page 21

The code
chdir($startdir) or
die "Unable to change to dir $startdir:$!
";

was moved just below the foreach loop.

Anonymous    Oct 01, 2000
Printed
Page 23
subroutine CheckFile

the line:

my $r=sysread(T,$t,1);

now reads:

my $r=sysread(T,$i,1);

because the loop variable is $i, not $t.

Anonymous    Aug 01, 2000
Printed
Page 28
Table 2-2 caption:

has a spurious "MacOS" in it (bad search and replace?). It now reads:

Table 2.2 File::Find Variables

Anonymous    Aug 01, 2000
Printed
Page 33
Chapter 10

Chapter 10, the checkfile program, the extended version near the end of the chapter right below the line, "Let's extend our previous attribute-checking program to
include MD5:"

open(F,$savedstats[0]) or die "Unable to open $opt_c:$!\n";

should be:

open(F,$savedstats[0]) or die "Unable to open $savedstats[0]:$!\n";

Anonymous   
Printed
Page 45
1st paragraph

The getpwent() and associated user functions return two additional fields
($quota, $comment) which are just before $gcos.

A footnote was inserted on this page. The footnote marker is after the colon
in "let's look at the fields our code returns:".

The footnote text:

The values returned by <CW>getpwent()<CW> changed between
Perl 5.004 and 5.005; this is the 5.004 list of values. In
5.005 and later, there are two additional fields, <CW>$quota</CW>
and <CW>$comment</CW>, in the list right before <CW>$gcos</CW>.
See your system documentation for <CW>getpwent()</CW> for more
information.

Anonymous    Aug 01, 2000
Printed
Page 63
In the Subroutine "CollectInformation"

return $record now reads return \%record.

Anonymous    Oct 01, 2000
Printed
Page 111

spurious closing brace
'winmgmts:{impersonationLevel}=impersonate}!Win32_Process')

was changed to:

'winmgmts:{impersonationLevel=impersonate}!Win32_Process')

Anonymous    Oct 01, 2000
Printed
Page 112

spurious closing brace
'winmgmts:{impersonationLevel}=impersonate}!Win32_Process')

was changed to:

'winmgmts:{impersonationLevel=impersonate}!Win32_Process')

Anonymous    Oct 01, 2000
Printed
Page 112
missing " "

print "--- Methods ---
";

was changed to:

print "
--- Methods ---
";

Anonymous    Oct 01, 2000
Printed
Page 113
spurious closing brace

'winmgmts:{impersonationLevel}=impersonate}')

was changed to:

'winmgmts:{impersonationLevel=impersonate}')

Anonymous    Oct 01, 2000
Printed
Page 131
2d from the bottom

The link http://www.dtmf.org was transliterated; the correct link now reads
http://www.dmtf.org.

Anonymous    Oct 01, 2000
Printed
Page 154

the line

$/ = $recordsep;

should be added right before

# read in database file

Anonymous   
Printed
Page 177

Table 6-1 now states that Net::LDAP does support SSL.

Anonymous    Aug 01, 2000
Printed
Page 182

To be strictly RFC-compliant, the filter
(&(sn=Finkelstein)(!l=Boston))

now reads

(&(sn=Finkelstein)(!(l=Boston)))

Anonymous    Aug 01, 2000
Printed
Page 187
last code line on the page

$ldif = new Net::LDAP::LDIF($filename);

now reads:

$ldif = new Net::LDAP::LDIF($filename,"w");


Anonymous    Aug 01, 2000
Printed
Page 189-190
second bullet now reads

<bullet> If the <CW>add()</CW> fails, we request a decimal error code.
For instance, we may see our code print something like this:

<programlisting>
Error in add for cn=Ursula Hampster, ou=Alumni Association, ou=People,
o=University of Michigan, c=US: error code 68
</programlisting>

If the server returns a textual message, the <CW>error()</CW> method
retrieves it for us, just like the error reporting code we used with
<CW>Mozilla::LDAP</CW>:

<programlisting>
print "The error message is: ".$res->error."
";
</programlisting>

It is safer to test the return value of <CW>code</CW>, as we do in
the previous example, because LDAP servers don't always populate the
textual error message information in their replies. If you need to
convert a decimal error code to an error message or message name, the
<CW>Net::LDAP::Util</CW> module offers two routines for this purpose:
<CW>ldap_error_text()</CW> and <CW>ldap_error_name()</CW>.

Anonymous    Aug 01, 2000
Printed
Page 220
Module information table:

The value for Net::LDAP now reads 0.20.

Anonymous    Oct 01, 2000
Printed
Page 262 & 265

if ($successes == $machines){

should be:

if ($succeeded == $machines){

Anonymous   
Printed
Page 299
3rd line

Win32::EventLog::GetMessageText = 1;

is now prefaced with a dollar sign, like so:

$Win32::EventLog::GetMessageText = 1;

Anonymous    Aug 01, 2000
Printed
Page 299

$log = new Win32::EventLog("System")
or die "Unable to open system log:$!
";

now reads:

$log = new Win32::EventLog("System")
or die "Unable to open system log:$^E
";

Anonymous    Oct 01, 2000
Printed
Page 304
The line which says

kill -HUP $pid;

now reads:

kill 'HUP', $pid;

Anonymous    Oct 01, 2000
Printed
Page 311

Win32::EventLog::Open($EventLog,'System','')
or die "Could not open System log:$!
";

now reads:

Win32::EventLog::Open($EventLog,'System','')
or die "Could not open System log:$^E
";

Anonymous    Oct 01, 2000
Printed
Page 370
4th line from the end

The line reads:

if (Net::PcapUtils::open_live(\&grab_ip_and_ping, FILTER => $prog));

it should be:

if (Net::PcapUtils::loop(\&grab_ip_and_ping, FILTER => $prog));

Anonymous   
Printed
Page 386
Figure B-2

The text describes entries in an LDAP directory while the figure depicted a GUI
display of an ADSI class. The figure has been changed.

Anonymous    Oct 01, 2000
Printed
Page 386
Fig. B-2

The figure was replaced.

Anonymous    Feb 01, 2001