Markus Wolf (5) [Avatar] Offline
#1
Dear All,

here are some additional corrections. They follow this schema,

[ Page, Paragraph, Line, 'your text' => 'my suggestion' ]

Please count negative numbers for a paragraph from end of page or for a line from end of paragraph. Headers, tables or graphics are usually not counted here.

[ xxxii, +3, -1, 'http://www.manning.com/maher website' => 'http://www.manning.com/maher web page' ]
[ xxxii, -1, +2, 'http://www.manning.com/maher website' => 'http://www.manning.com/maher web page' ]
[ xxxiii, -2, -3, 'the the' => 'the' ]
[ 11, +1, +1, 'the end the argument list' => 'the end of the argument list' ]

Nice book and best regards markus
tmaher (37) [Avatar] Offline
#2
Re: Some small corrections
Thanks for the input, Markus! I'll review your suggestions and update the errata list accordingly.
Markus Wolf (5) [Avatar] Offline
#3
Re: Some small corrections
Hi Tim, hi All,

should I post further suggestions to this thread or open a new one? For now, I will add them here.

[ 45, Table 2.9, paragraph 4, '-wnla' ]

=> what does option -a mean? perl -h gave me the solution (autosplit mode). But I did not find -a mentioned on any page prior 45, nor anywhere in the index. Please shed some light on my head, if I just missed it.


[ 45, Table 2.9, paragraph 4, 'print $F[0];' F ] and
[ 45, Table 2.9, paragraph 5, 'print $F[2];' F ]

=> On first read, I was a little bit confused on usage of (italic) F as a file name. It 'accidentally' corresponds to the $F[] in the code, which misled me a bit smilie) And yes, I read chapter 'about this book'.


[ 45, Table 2.9, paragraph 10, '-n switch variable or option?' ]

=> You use -n as a switch variable to script print_lines. I have asked myself, how does perl know, if -n is a switch variable, or if it is the option -n (assume while loop)? Or does it depend, if a script file is used or a -e '' option?

Best regards markus
tmaher (37) [Avatar] Offline
#4
Re: Some small corrections
> Hi Tim, hi All,
>
> should I post further suggestions to this thread or
> open a new one? For now, I will add them here.

That's fine!

> [ 45, Table 2.9, paragraph 4, '-wnla' ]
>
> => what does option -a mean? perl -h gave me the
> solution (autosplit mode). But I did not find -a
> mentioned on any page prior 45, nor anywhere in the
> index. Please shed some light on my head, if I just
> missed it.

Discussions of field processing, and the associated -a option, are intentionally
deferred until Chapter 5, because AWK is traditionally used in that arena.
However, for reference purposes, I included the Primary Option Clusters
that allow field processing in Table 2.9 (top section, p. 45). The reader can infer
that adding -a enables that feature, by comparing the descriptions of -wl/-wnl
and -wnla/-wnlaF'sep'. That being said, I agree that an explicit statement of what
-a does would be appropriate, and I expect that I mentioned that somewhere in Chapter
2 (perhaps in a footnote). In chapter 5, the -a option is explained at the beginning of section 5.3.4, on p. 136.

Regarding your point about the index, there should indeed be an entry under A for the -a
option, but there
sure isn't! 8-{.

>
> [ 45, Table 2.9, paragraph 4, 'print $F[0];' F ]
> and
> [ 45, Table 2.9, paragraph 5, 'print $F[2];' F ]
>
> => On first read, I was a little bit confused on
> usage of (italic) F as a file name. It
> 'accidentally' corresponds to the $F[] in the code,
> which misled me a bit smilie) And yes, I read chapter
> 'about this book'.

Sorry about that. As you can see toward the middle of the table, there's
no room to spare for long dummy filenames (such as file, file2, etc.), so
during the typesetting processing we had to abbreviate those names to F, F2.
I'm glad you read "About this book", because that's where the special meaning
of italicized words as placeholders is explained—which is meant to eliminate
any confusion between $F[2] and F2 and the like.
>
> [ 45, Table 2.9, paragraph 10, '-n switch variable
> or option?' ]
>
> => You use -n as a switch variable to script
> print_lines. I have asked myself, how does perl
> know, if -n is a switch variable, or if it is the
> option -n (assume while loop)? Or does it depend, if
> a script file is used or a -e '' option?

You're on the right track—the interpretation of -n (or any other string) depends on the context in which it's found. When -n appears after the perl command but before the program argument or script name, it's taken as an invocation option. However, if it appears as an argument to a script, it's interpretation is entirely up to the author of the script how it will be interpreted.
>
> Best regards markus

Thanks for your astute comments, Markus! I'll update the errata sheet to correct the
missing index entry for -a.
Markus Wolf (5) [Avatar] Offline
#5
Re: Some small corrections
Hi Tim,

> and -wnla/-wnlaF'sep'. That being said, I agree that an explicit statement of what
> -a does would be appropriate, and I expect that I mentioned that somewhere in Chapter
> 2 (perhaps in a footnote). In chapter 5, the -a option is explained at the beginning of section 5.3.4, on p. 136

You are completely right, you have; right in the second paragraph below table 2.9 on the next page 46. Shamefully, I did not read on to it, before I posted the correction smilie)

Here are some small additional questions, though

[ 46, 2, 2-3, ' i option' and ' a and F options' => ' -i option' and ' -a and -F options' ]

=> Although syntactically correct, I am used to read options with a dash: -i, -a and -F.


[ 46, -2, 1, 'alias Perl_o = ' perl -00 -wl ' ' ]

=> isn't option -00 mostly used together with options -n or -p, but rarely with -wl only ?


> Thanks for your astute comments, Markus!

Thanks, nice to hear. Its not that easy to write down the corrections to a pice of paper while reading the book - I do hate to write INTO the book - , while standing in a see-sawing(?) train..

Best regards markus
tmaher (37) [Avatar] Offline
#6
Re: Some small corrections
> Hi Tim,
>
> > and -wnla/-wnlaF'sep'. That being said, I agree
> that an explicit statement of what
> > -a does would be appropriate, and I expect that I
> mentioned that somewhere in Chapter
> > 2 (perhaps in a footnote). In chapter 5, the -a
> option is explained at the beginning of section
> 5.3.4, on p. 136
>
> You are completely right, you have; right in the
> second paragraph below table 2.9 on the next page
> 46. Shamefully, I did not read on to it, before I
> posted the correction smilie)

No harm done! 8-}

> Here are some small additional questions, though
>
> [ 46, 2, 2-3, ' i option' and ' a and F options' =>
> ' -i option' and ' -a and -F options' ]
>
> => Although syntactically correct, I am used to read
> options with a dash: -i, -a and -F.

That's a convention based on the need to distinguish the word "a" from the option "a"
when plain-text is the format. But of course, "a" is the option, not "-a", which is just one
way of requesting that the option be enabled. For this reason, when writing in a format
that allows for font variations, I refer to the a option rather than the -a option. (I'm
using a bold font to mark the "a" as special here, but the courier font is used in the book instead.)

>
> [ 46, -2, 1, 'alias Perl_o = ' perl -00 -wl ' ' ]
>
> => isn't option -00 mostly used together with
> options -n or -p, but rarely with -wl only ?

You're correct, because in a program that doesn't read any input (i.e., one doing only Output Generation), there's generally little incentive for modifying the input record separator. However, when used in conjunction with the l option as shown, the 00 option
has the added effect of setting the output record separator to two newlines—to
separate printed outputs by a blank line—which can be useful on occasion.

> > Thanks for your astute comments, Markus!
>
> Thanks, nice to hear. Its not that easy to write
> down the corrections to a pice of paper while
> reading the book - I do hate to write INTO the book
> - , while standing in a see-sawing(?) train..
>
> Best regards markus

FWIW, I hereby grant you the author's permission to write in the book in any way that helps you to benefit from it! 8->

-Tim
Markus Wolf (5) [Avatar] Offline
#7
Re: Some small corrections
Hi Tim,

[ 87, 1 (items with bullets), items 7 and 9, 'provided for by' => 'provided by' ]
I don't know, what 'provided for' does mean, as I am not that experienced in english. But it sounds more familiar without 'for'..

[ 88, -1, -1, 'Regular expressions FAQ' => 'Regular expressions FAQ (part 6)' ]
A little bit nit-picking, I know smilie)

Thanks and best regards markus

-- [ page, -/+para, -/+line, 'your text' => 'my suggestion' ]
tmaher (37) [Avatar] Offline
#8
Re: Some small corrections
> Hi Tim,
>
> [ 87, 1 (items with bullets), items 7 and 9,
> 'provided for by' => 'provided by' ]
> I don't know, what 'provided for' does mean, as I am
> not that experienced in english. But it sounds more
> familiar without 'for'..

"for" isn't really needed I suppose, but I like "provided for" as
it's written—and so did my copy editor, so I'll let that stand.

> [ 88, -1, -1, 'Regular expressions FAQ' => 'Regular
> expressions FAQ (part 6)' ]

Your rewrite seems to specify part 6 of the Reg. Exp. FAQ, which
isn't correct—part 6 of the Perl FAQ series is the section that's
about regular expressions.

In any case, I didn't want to get into part numbers since the reader is
already provided with the command man perlfaq6, and there's not
much space in that comment field to tell the whole story, which would be:

• man perlfaq6 # The Regular Expressions FAQ, which is #6 in Perl's series of FAQ files

> A little bit nit-picking, I know smilie)

I think you're threshold for nit-detection needs to be recalibrated a bit,
but as always I'm grateful for your contributions to this forum.

> Thanks and best regards markus
>
> -- [ page, -/+para, -/+line, 'your text' => 'my
> suggestion' ]

-Tim
Markus Wolf (5) [Avatar] Offline
#9
Re: Some small corrections
Hi Tim,

> "for" isn't really needed I suppose, but I like "provided for" as
> it's written—and so did my copy editor, so I'll let that stand.

As said, I am no native speaker, so please excuse this suggestion..

> man perlfaq6

You are totally right, we did mean the same, but I couldn't express it exactly smilie)

> I think you're threshold for nit-detection needs to be recalibrated a bit,
> but as always I'm grateful for your contributions to this forum.

Ok then I will focus on 'big errors', which I will not find any(more) smilie)

Nice weekend and best regards markus